diff options
Diffstat (limited to 'include/dir_fns.php')
-rw-r--r-- | include/dir_fns.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php index e234ae0fa..fef58428f 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -20,6 +20,22 @@ 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( + '$safemode' => t('Safe Mode'), + '$toggle' => $toggle, + )); + + return $o; +} function sync_directories($dirmode) { |