From d7e5d9fdab1be995187d62e93fa7ebdc7a2ea439 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 20 Jul 2009 04:10:55 +0000 Subject: Bug 314364: Make QuickSearch use "matches" for comment searches instead of "substring" Patch by Max Kanat-Alexander r=wicked, a=mkanat --- Bugzilla/Search/Quicksearch.pm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'Bugzilla/Search') diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index 70b5e2f2c..5f5eae95f 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -167,8 +167,6 @@ sub quicksearch { $searchstring =~ s/\s+NOT\s+/ -/g; my @words = splitString($searchstring); - my $searchComments = - $#words < Bugzilla->params->{'quicksearch_comment_cutoff'}; my @openStates = BUG_STATE_OPEN; my @closedStates; my @unknownFields; @@ -245,10 +243,8 @@ sub quicksearch { } } elsif ($firstChar eq '#') { - addChart('short_desc', 'anywords', $baseWord, $negate); - if ($searchComments) { - addChart('longdesc', 'anywords', $baseWord, $negate); - } + addChart('short_desc', 'substring', $baseWord, $negate); + addChart('content', 'matches', $baseWord, $negate); } elsif ($firstChar eq ':') { foreach (@subWords) { @@ -386,10 +382,7 @@ sub quicksearch { addChart('status_whiteboard', 'substring', $word, $negate); } - if ($searchComments) { - addChart('longdesc', 'substring', - $word, $negate); - } + addChart('content', 'matches', $word, $negate); } # URL field (for IP addrs, host.names, # scheme://urls) -- cgit v1.2.3-24-g4f1b