aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-20 02:35:15 +0000
committermkanat%bugzilla.org <>2008-08-20 02:35:15 +0000
commit20fb3d39980ab048132361631dfe8ee8e4e9a305 (patch)
tree3d556b71770da3ab5d7ed5206f4839101b14307f
parentda8a6f8b53f16756e88ec1bb378b2fd29baf9a5b (diff)
downloadbugs-20fb3d39980ab048132361631dfe8ee8e4e9a305.tar
bugs-20fb3d39980ab048132361631dfe8ee8e4e9a305.tar.gz
bugs-20fb3d39980ab048132361631dfe8ee8e4e9a305.tar.bz2
bugs-20fb3d39980ab048132361631dfe8ee8e4e9a305.tar.xz
bugs-20fb3d39980ab048132361631dfe8ee8e4e9a305.zip
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
-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 . '"';
}
}