aboutsummaryrefslogtreecommitdiffstats
path: root/include/dir_fns.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-11-09 18:43:40 +0000
committerThomas Willingham <founder@kakste.com>2013-11-09 18:43:40 +0000
commit7b29400c6c8448718f156aff73754f669992ee69 (patch)
tree47e3f3514e7e4d0960bc79a88a9391f6c84de44c /include/dir_fns.php
parent6f2163a08ec6b48a113e768c8fc0a94f8dd0bde1 (diff)
downloadvolse-hubzilla-7b29400c6c8448718f156aff73754f669992ee69.tar.gz
volse-hubzilla-7b29400c6c8448718f156aff73754f669992ee69.tar.bz2
volse-hubzilla-7b29400c6c8448718f156aff73754f669992ee69.zip
Bring safe search to the UI
Diffstat (limited to 'include/dir_fns.php')
-rw-r--r--include/dir_fns.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index e234ae0fa..319be25c4 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -20,7 +20,25 @@ function dir_sort_links() {
return $o;
}
+function dir_safe_mode(&$a) {
+ $observer = get_observer_hash();
+
+// if ($observer)
+ $safe_mode = get_xconfig($observer,'directory','safe_mode');
+ if($safe_mode == 0)
+ $toggle = t('Enable Safe Search');
+ else
+ $toggle = t('Disable Safe Search');
+ $o = replace_macros(get_markup_template('safesearch.tpl'), array(
+ '$toggle' => $toggle,
+ ));
+
+ return $o;
+}
+if($safe_mode == 1)
+ set_xconfig($observer,'directory','safe_mode', '0');
+
function sync_directories($dirmode) {
if($dirmode == DIRECTORY_MODE_STANDALONE || $dirmode == DIRECTORY_MODE_NORMAL)