mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11177] return no results when query has only negation
If search query has only -foo then instead of displaying all results that do not have foo, should display no results found. PHPBB3-11177
This commit is contained in:
parent
f1a692a5f4
commit
01eebd6511
1 changed files with 6 additions and 0 deletions
|
@ -281,6 +281,12 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||
return false;
|
||||
}
|
||||
|
||||
// When search query contains queries like -foo
|
||||
if (strpos($this->search_query, '+') === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// generate a search_key from all the options to identify the results
|
||||
$search_key = md5(implode('#', array(
|
||||
implode(', ', $this->split_words),
|
||||
|
|
Loading…
Add table
Reference in a new issue