aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-11 09:46:31 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-11 09:46:31 +0100
commit214f515e9ccc71e368882384fb38bd7135b0e40f (patch)
tree276edf9e7a74654d513f112447241c524459d647 /phpBB/includes
parenta35901c29bfbb29271d660d741d87b3f0d9a7746 (diff)
parent2b959e3331f9bb585c115911e027844afe54d1e6 (diff)
downloadforums-214f515e9ccc71e368882384fb38bd7135b0e40f.tar
forums-214f515e9ccc71e368882384fb38bd7135b0e40f.tar.gz
forums-214f515e9ccc71e368882384fb38bd7135b0e40f.tar.bz2
forums-214f515e9ccc71e368882384fb38bd7135b0e40f.tar.xz
forums-214f515e9ccc71e368882384fb38bd7135b0e40f.zip
Merge remote-tracking branch 'dhruvgoel92/ticket/11288' into develop-olympus
* dhruvgoel92/ticket/11288: [ticket/11288] Handle +,- without preceeding whitespace characters
Diffstat (limited to 'phpBB/includes')
-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 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);