1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

Merge pull request #6343 from rxu/ticket/16933

[ticket/16933] Consistent handling of hyphen by phpBB Native search backend
This commit is contained in:
Marc Alexander
2022-01-12 21:26:10 +01:00
2 changed files with 14 additions and 1 deletions

View File

@@ -253,6 +253,16 @@ class fulltext_native extends \phpbb\search\base
$keywords[$i] = ' ';
break;
case '-':
// Ignore hyphen if followed by a space
if (isset($keywords[$i + 1]) && $keywords[$i + 1] == ' ')
{
$keywords[$i] = ' ';
}
else
{
$space = $keywords[$i];
}
break;
case '+':
$space = $keywords[$i];
break;