diff options
-rw-r--r-- | inc/search.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/search.php b/inc/search.php index 654f1ab69..b96f2444d 100644 --- a/inc/search.php +++ b/inc/search.php @@ -317,6 +317,9 @@ function search_fulltext(&$data,$base,$file,$type,$lvl,$opts){ break; } } + + // a search without any posword is useless + if (!count($poswords)) return true; $req = count($poswords) ? $reg .= '^(?=.*?'.join(')(?=.*?',$poswords).')' : '^'; $reg .= count($negwords) ? '((?!'.join('|',$negwords).').)*$' : '.*$'; |