]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
A fix for bug 446645--make hyphens at the beginning of words still count as negation...
authormkanat%bugzilla.org <>
Wed, 20 Aug 2008 02:35:15 +0000 (02:35 +0000)
committermkanat%bugzilla.org <>
Wed, 20 Aug 2008 02:35:15 +0000 (02:35 +0000)
Patch By Jesse Clark <jjclark1982@gmail.com> r=mkanat, a=mkanat

Bugzilla/DB/Mysql.pm

index d645d79c55d35f5c1a2ce0a5d6b621335ed43b6d..2f42f9f34e6fbbd2aa832ae8d3ff1eed0469146b 100644 (file)
@@ -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 . '"';
             }
         }