aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-19 21:45:09 -0700
committerfriendica <info@friendica.com>2013-09-19 21:45:09 -0700
commit977b350866f9abecf409fbf4556c1e1e3e288a14 (patch)
tree2e78d6131027eea2eeb1189d2282fe07d7fd5e1a /mod
parent6cb81f6e474c3b904e5c759ee96e7fac115050e9 (diff)
downloadvolse-hubzilla-977b350866f9abecf409fbf4556c1e1e3e288a14.tar.gz
volse-hubzilla-977b350866f9abecf409fbf4556c1e1e3e288a14.tar.bz2
volse-hubzilla-977b350866f9abecf409fbf4556c1e1e3e288a14.zip
bring safe mode to the client side
Diffstat (limited to 'mod')
-rw-r--r--mod/directory.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/mod/directory.php b/mod/directory.php
index cc4e7e81f..dfc0efc88 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -24,6 +24,17 @@ function directory_content(&$a) {
return;
}
+ $safe_mode = 1;
+
+ if(local_user()) {
+ $safe_mode = get_pconfig(local_user(),'directory','safe_mode');
+ }
+ if($safe_mode === false)
+ $safe_mode = 1;
+ else
+ $safe_mode = intval($safe_mode);
+
+
$o = '';
nav_set_selected('directory');
@@ -73,7 +84,7 @@ function directory_content(&$a) {
$numtags = get_config('system','directorytags');
$kw = ((intval($numtags)) ? $numtags : 24);
- $query = $url . '?f=&kw=' . $kw;
+ $query = $url . '?f=&kw=' . $kw . (($safe_mode != 1) ? '&safe=' . $safe_mode : '');
if($search)
$query .= '&name=' . urlencode($search) . '&keywords=' . urlencode($search);
if(strpos($search,'@'))