From 35f99bbebf22b711ba24d15377f2de2a73eff2c4 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 29 Mar 2010 14:14:14 -0700 Subject: Bug 554986: Add a "notmatches" search type, which allows the minus sign operator to start working for bare words in Quicksearch again r=LpSolit, a=LpSolit --- Bugzilla/Search/Quicksearch.pm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'Bugzilla/Search') diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index c71fab85b..7839c4fd5 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -524,19 +524,10 @@ sub matchPrefixes { sub negateComparisonType { my $comparisonType = shift; - if ($comparisonType eq 'substring') { - return 'notsubstring'; - } - elsif ($comparisonType eq 'anywords') { + if ($comparisonType eq 'anywords') { return 'nowords'; } - elsif ($comparisonType eq 'regexp') { - return 'notregexp'; - } - else { - # Don't know how to negate that - ThrowCodeError('unknown_comparison_type'); - } + return "not$comparisonType"; } # Add a boolean chart -- cgit v1.2.3-24-g4f1b