Merge PR #1043 branch 'dhruvgoel92/ticket/11177' into develop

* dhruvgoel92/ticket/11177:
  [ticket/11177] return no results when query has only negation
This commit is contained in:
Oleg Pudeyev 2012-11-09 14:23:25 -05:00
commit 36da105a33

View file

@ -343,6 +343,12 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
return false; 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 // generate a search_key from all the options to identify the results
$search_key = md5(implode('#', array( $search_key = md5(implode('#', array(
implode(', ', $this->split_words), implode(', ', $this->split_words),