summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-20 04:35:15 +0200
committermkanat%bugzilla.org <>2008-08-20 04:35:15 +0200
commit20fb3d39980ab048132361631dfe8ee8e4e9a305 (patch)
tree3d556b71770da3ab5d7ed5206f4839101b14307f /Bugzilla
parentda8a6f8b53f16756e88ec1bb378b2fd29baf9a5b (diff)
downloadbugzilla-20fb3d39980ab048132361631dfe8ee8e4e9a305.tar.gz
bugzilla-20fb3d39980ab048132361631dfe8ee8e4e9a305.tar.xz
A fix for bug 446645--make hyphens at the beginning of words still count as negation for fulltext searching in MySQL.
Patch By Jesse Clark <jjclark1982@gmail.com> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Mysql.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index d645d79c5..2f42f9f34 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -157,10 +157,10 @@ sub sql_fulltext_search {
$mode = 'IN BOOLEAN MODE';
# quote un-quoted compound words
- my @words = quotewords('[\s()]+', 'delimiter', $text);
+ my @words = quotewords('[\s()]+', 'delimiters', $text);
foreach my $word (@words) {
- # match words that have word chars, non-word chars, and no quotes
- if ($word =~ /\w/ && $word =~ m/\W/ && $word !~ m/"/) {
+ # match words that have non-word chars in the middle of them
+ if ($word =~ /\w\W+\w/ && $word !~ m/"/) {
$word = '"' . $word . '"';
}
}