summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-06 20:11:42 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-06 20:11:42 +0000
commitb7a3421a21dcfafa93505b980de9f1cf8fd3532e (patch)
tree046093f74f6554461e3dd5e69b2336825a72fd94
parente1ecd6fde3f52e917907ec1dffc774829934d0dd (diff)
downloadrpg-b7a3421a21dcfafa93505b980de9f1cf8fd3532e.tar.gz
rpg-b7a3421a21dcfafa93505b980de9f1cf8fd3532e.tar.bz2
use \!empty() rather than error suppression
-rw-r--r--inc/search.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/search.php b/inc/search.php
index 89f3e253d..21666b3fd 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -351,10 +351,11 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;
// get ID and check if it is a valid one
- $item['id'] = pathID($file,($type == 'd' || @$opts['keeptxt']));
+ $item['id'] = pathID($file,($type == 'd' || !empty($opts['keeptxt'])));
if($item['id'] != cleanID($item['id'])){
- if($opts['showmsg'])
+ if($opts['showmsg']){
msg(hsc($item['id']).' is not a valid file name for DokuWiki - skipped',-1);
+ }
return false; // skip non-valid files
}
$item['ns'] = getNS($item['id']);