mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11288] Handle +,- without preceeding whitespace characters
PHPBB3-11288
This commit is contained in:
parent
00f8fe24d2
commit
a3033a4a86
1 changed files with 6 additions and 0 deletions
|
@ -232,6 +232,12 @@ class fulltext_native extends search_backend
|
|||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Handle +, - without preceeding whitespace character
|
||||
$match = array('#(\S)\+#', '#(\S)-#');
|
||||
$replace = array('$1 +', '$1 +');
|
||||
|
||||
$keywords = preg_replace($match, $replace, $keywords);
|
||||
|
||||
// now analyse the search query, first split it using the spaces
|
||||
$query = explode(' ', $keywords);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue