diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-10-05 21:09:52 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2014-03-09 21:51:34 +0530 |
commit | a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14 (patch) | |
tree | 4a66977ccac2b3a652dd4fdf02a9db2937b41149 /phpBB | |
parent | 00f8fe24d2641823f51990b30d5a3f84884a78a6 (diff) | |
download | forums-a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14.tar forums-a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14.tar.gz forums-a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14.tar.bz2 forums-a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14.tar.xz forums-a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14.zip |
[ticket/11288] Handle +,- without preceeding whitespace characters
PHPBB3-11288
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/search/fulltext_native.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 2ee119ccfe..29c5a72874 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -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); |