mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Merge branch '3.3.x'
This commit is contained in:
@@ -308,7 +308,11 @@ class fulltext_native extends base implements search_backend_interface
|
||||
);
|
||||
|
||||
$keywords = preg_replace($match, $replace, $keywords);
|
||||
$num_keywords = count(explode(' ', $keywords));
|
||||
|
||||
// Ensure a space exists before +, - and | to make the split and count work correctly
|
||||
$countable_keywords = preg_replace('/(?<!\s)(\+|\-|\|)/', ' $1', $keywords);
|
||||
|
||||
$num_keywords = count(explode(' ', $countable_keywords));
|
||||
|
||||
// We limit the number of allowed keywords to minimize load on the database
|
||||
if ($this->config['max_num_search_keywords'] && $num_keywords > $this->config['max_num_search_keywords'])
|
||||
|
Reference in New Issue
Block a user