diff options
author | Josh Woody <a_jelly_doughnut@phpbb.com> | 2010-07-29 10:13:17 -0500 |
---|---|---|
committer | Josh Woody <a_jelly_doughnut@phpbb.com> | 2010-07-29 10:13:17 -0500 |
commit | ac56b71c3ede46ab839ff77a0b324ef746d90cb0 (patch) | |
tree | cd0e7d92247bf94b565d489d1f7697ee8b6f39e7 /phpBB/includes/search | |
parent | fc25fe694afdab683789c9ed962c77558f85796c (diff) | |
download | forums-ac56b71c3ede46ab839ff77a0b324ef746d90cb0.tar forums-ac56b71c3ede46ab839ff77a0b324ef746d90cb0.tar.gz forums-ac56b71c3ede46ab839ff77a0b324ef746d90cb0.tar.bz2 forums-ac56b71c3ede46ab839ff77a0b324ef746d90cb0.tar.xz forums-ac56b71c3ede46ab839ff77a0b324ef746d90cb0.zip |
[ticket/9749] Fulltext mysql unexpected behavior on entering a dash in query
The Fulltext_mysql class had different behavior when a dash was entered in the
search query than the fulltext_native class. Specifically, a dash was
automatically turned into boolean NOT even when the user wanted to search for
legitimate hyphenated words like farty-pants
PHPBB3-9749
Diffstat (limited to 'phpBB/includes/search')
-rw-r--r-- | phpBB/includes/search/fulltext_mysql.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index da3833754e..0be3a10e5f 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -122,7 +122,7 @@ class fulltext_mysql extends search_backend if ($terms == 'all') { - $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#'); + $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#'); $replace = array(' +', ' |', ' -', ' +', ' -', ' |'); $keywords = preg_replace($match, $replace, $keywords); |