mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11288] fix regex in postgres
Postgres search backend now uses updated regex being used by mysql search backend. PHPBB3-11288
This commit is contained in:
parent
3a30bd2753
commit
bfdc6e1930
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
||||||
{
|
{
|
||||||
if ($terms == 'all')
|
if ($terms == 'all')
|
||||||
{
|
{
|
||||||
$match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#');
|
$match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#');
|
||||||
$replace = array(' +', ' |', ' -', ' +', ' -', ' |');
|
$replace = array(' +', ' |', ' -', ' +', ' -', ' |');
|
||||||
|
|
||||||
$keywords = preg_replace($match, $replace, $keywords);
|
$keywords = preg_replace($match, $replace, $keywords);
|
||||||
|
|
Loading…
Add table
Reference in a new issue