1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

Merge PR #1388 branch 'dhruvgoel92/ticket/11288' into develop

# By Dhruv
# Via Dhruv
* dhruvgoel92/ticket/11288:
  [ticket/11288] fix regex in postgres
  [ticket/11288] add search tests cases
This commit is contained in:
Oleg Pudeyev
2013-05-06 15:46:00 -04:00
2 changed files with 99 additions and 1 deletions

View File

@@ -214,7 +214,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
{
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(' +', ' |', ' -', ' +', ' -', ' |');
$keywords = preg_replace($match, $replace, $keywords);