summaryrefslogtreecommitdiff
path: root/inc/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/search.php')
-rw-r--r--inc/search.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/search.php b/inc/search.php
index ee4eef534..89f3e253d 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -371,8 +371,12 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;
}
}
- if($return && !preg_match('/'.$opts['recmatch'].'/',$file)){
- $return = false; // doesn't match
+
+ if ($return) {
+ $match = empty($opts['recmatch']) || preg_match('/'.$opts['recmatch'].'/',$file);
+ if (!$match) {
+ return false; // doesn't match
+ }
}
}