aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-10-05 21:09:52 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-10-05 21:09:52 +0530
commit2b959e3331f9bb585c115911e027844afe54d1e6 (patch)
treed696e79fec071b7d256aeb5328b7f78548be6c10 /phpBB
parenta5c532979d578b9c3807d252b064f5292820e4b7 (diff)
downloadforums-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.php6
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);