diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2014-03-09 22:00:06 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2014-03-09 22:00:06 +0530 |
commit | 1688d88059eec41905a869b54b4356dbf7e50868 (patch) | |
tree | 4ae33e46596108d1f8188ca2a45920bf92afef1e | |
parent | 7ca762c5247c9be0ff6beef03162e4b81dbf2c73 (diff) | |
parent | a3033a4a8650e2fcbe8b2e8e9f3044f872c0ea14 (diff) | |
download | forums-1688d88059eec41905a869b54b4356dbf7e50868.tar forums-1688d88059eec41905a869b54b4356dbf7e50868.tar.gz forums-1688d88059eec41905a869b54b4356dbf7e50868.tar.bz2 forums-1688d88059eec41905a869b54b4356dbf7e50868.tar.xz forums-1688d88059eec41905a869b54b4356dbf7e50868.zip |
Merge branch 'ticket/11288' into ticket/11288-develop
* ticket/11288:
[ticket/11288] Handle +,- without preceeding whitespace characters
-rw-r--r-- | phpBB/phpbb/search/fulltext_native.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index fb3726c957..60180f1728 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -326,6 +326,12 @@ class fulltext_native extends \phpbb\search\base $this->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); |