diff options
author | friendica <info@friendica.com> | 2013-11-09 12:10:54 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-11-09 12:10:54 -0800 |
commit | 1f16dd3bb029476c67d1707077b98af91d374597 (patch) | |
tree | aa90eaf592d39b7e3a989a31f091ca1ed07856a0 /include | |
parent | 3a9cbcaf011f5c5d423e1cd99b43442669692129 (diff) | |
parent | bbe16eba346274daae7532158e997b7becde5cc2 (diff) | |
download | volse-hubzilla-1f16dd3bb029476c67d1707077b98af91d374597.tar.gz volse-hubzilla-1f16dd3bb029476c67d1707077b98af91d374597.tar.bz2 volse-hubzilla-1f16dd3bb029476c67d1707077b98af91d374597.zip |
Merge pull request #195 from beardy-unixer/master
Fix safe search and also make it an xconfig
Diffstat (limited to 'include')
-rw-r--r-- | include/dir_fns.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php index e234ae0fa..0d0507059 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -20,6 +20,21 @@ 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; +} function sync_directories($dirmode) { |