diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-10-05 21:09:52 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-10-05 21:09:52 +0530 |
commit | 2b959e3331f9bb585c115911e027844afe54d1e6 (patch) | |
tree | d696e79fec071b7d256aeb5328b7f78548be6c10 /phpBB | |
parent | a5c532979d578b9c3807d252b064f5292820e4b7 (diff) | |
download | forums-2b959e3331f9bb585c115911e027844afe54d1e6.tar forums-2b959e3331f9bb585c115911e027844afe54d1e6.tar.gz forums-2b959e3331f9bb585c115911e027844afe54d1e6.tar.bz2 forums-2b959e3331f9bb585c115911e027844afe54d1e6.tar.xz forums-2b959e3331f9bb585c115911e027844afe54d1e6.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 dc961f3c8a..7fff83db58 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -233,6 +233,12 @@ class fulltext_native extends search_backend } unset($exact_words); + // 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); |