diff options
author | friendica <info@friendica.com> | 2013-09-19 21:36:22 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-19 21:36:22 -0700 |
commit | 6cb81f6e474c3b904e5c759ee96e7fac115050e9 (patch) | |
tree | ac8ffd5fd5c8e596f6847f20df378b6bccbe23d5 /mod | |
parent | 876a9d1850ec6fc2aa26f530e8ab554028158734 (diff) | |
download | volse-hubzilla-6cb81f6e474c3b904e5c759ee96e7fac115050e9.tar.gz volse-hubzilla-6cb81f6e474c3b904e5c759ee96e7fac115050e9.tar.bz2 volse-hubzilla-6cb81f6e474c3b904e5c759ee96e7fac115050e9.zip |
use &safe=-1 for unsafe only
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dirsearch.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index a92134942..fc0ac4fe3 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -41,6 +41,7 @@ function dirsearch_content(&$a) { $agege = ((x($_REQUEST,'agege')) ? intval($_REQUEST['agege']) : 0 ); $agele = ((x($_REQUEST,'agele')) ? intval($_REQUEST['agele']) : 0 ); $kw = ((x($_REQUEST,'kw')) ? intval($_REQUEST['kw']) : 0 ); + // by default use a safe search $safe = ((x($_REQUEST,'safe')) ? intval($_REQUEST['safe']) : 1 ); @@ -101,7 +102,9 @@ function dirsearch_content(&$a) { $logic = ((strlen($sql_extra)) ? 0 : 1); - $safesql = (($safe) ? " and not ( xchan_flags & " . intval(XCHAN_FLAGS_CENSORED) . " ) " : ''); + $safesql = (($safe > 0) ? " and not ( xchan_flags & " . intval(XCHAN_FLAGS_CENSORED) . " ) " : ''); + if($safe < 0) + $safesql = " and ( xchan_flags & " . intval(XCHAN_FLAGS_CENSORED) . " ) "; if($limit) $qlimit = " LIMIT $limit "; |