diff options
author | redmatrix <git@macgirvin.com> | 2016-04-18 20:38:38 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-18 20:38:38 -0700 |
commit | 2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289 (patch) | |
tree | 2376d950ba2bdc7753336a3e2b94865c95c238f2 /Zotlabs/Module/Toggle_safesearch.php | |
parent | 2a61817bad96526994c0499f1fc0a843a9cc9405 (diff) | |
download | volse-hubzilla-2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289.tar.gz volse-hubzilla-2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289.tar.bz2 volse-hubzilla-2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289.zip |
module updates
Diffstat (limited to 'Zotlabs/Module/Toggle_safesearch.php')
-rw-r--r-- | Zotlabs/Module/Toggle_safesearch.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Zotlabs/Module/Toggle_safesearch.php b/Zotlabs/Module/Toggle_safesearch.php new file mode 100644 index 000000000..2e9bc2575 --- /dev/null +++ b/Zotlabs/Module/Toggle_safesearch.php @@ -0,0 +1,31 @@ +<?php +namespace Zotlabs\Module; + + +class Toggle_safesearch extends \Zotlabs\Web\Controller { + + function init() { + + $observer = get_observer_hash(); + if (! $observer) + return; + + if($observer) + $safe_mode = get_xconfig($observer,'directory','safe_mode'); + if ($safe_mode == '') + set_xconfig($observer,'directory','safe_mode', '0'); + elseif($safe_mode == '0') + set_xconfig($observer,'directory','safe_mode', '1'); + elseif($safe_mode == '1') + set_xconfig($observer,'directory','safe_mode', '0'); + + if(isset($_GET['address'])) + $address = $_GET['address']; + else + $address = z_root() . '/directory'; + + goaway($address); + } + + +} |