From c030330abcbc7584db0d2abfb84acbb10211ee17 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 9 Nov 2013 15:36:14 +0000 Subject: Fix safe search, and also make it an xconfig --- mod/dirsearch.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mod/dirsearch.php') diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 527eb4c50..dcacef651 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -43,9 +43,10 @@ function dirsearch_content(&$a) { $kw = ((x($_REQUEST,'kw')) ? intval($_REQUEST['kw']) : 0 ); // by default use a safe search - $safe = ((x($_REQUEST,'safe')) ? intval($_REQUEST['safe']) : 1 ); - - + $safe = ((x($_REQUEST,'safe'))); // ? intval($_REQUEST['safe']) : 1 ); + if ($safe === false) + $safe = 1; + if(array_key_exists('sync',$_REQUEST)) { if($_REQUEST['sync']) $sync = datetime_convert('UTC','UTC',$_REQUEST['sync']); -- cgit v1.2.3