diff options
| author | terry%mozilla.org <> | 2000-01-27 05:48:35 +0000 |
|---|---|---|
| committer | terry%mozilla.org <> | 2000-01-27 05:48:35 +0000 |
| commit | c6c81144fc9c5976e3a747a27b469f7d9d991e67 (patch) | |
| tree | ec3fcc95eb19bc3da8d5fd0f6f023ef07213d7af /buglist.cgi | |
| parent | afdd0f2f0d165670329b1c63bbad2f5aebcf60cf (diff) | |
| download | bugs-c6c81144fc9c5976e3a747a27b469f7d9d991e67.tar bugs-c6c81144fc9c5976e3a747a27b469f7d9d991e67.tar.gz bugs-c6c81144fc9c5976e3a747a27b469f7d9d991e67.tar.bz2 bugs-c6c81144fc9c5976e3a747a27b469f7d9d991e67.tar.xz bugs-c6c81144fc9c5976e3a747a27b469f7d9d991e67.zip | |
Allow searches for "all keywords" or "no keywords"; fixed some other
bugs around keyword queries.
Diffstat (limited to 'buglist.cgi')
| -rwxr-xr-x | buglist.cgi | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/buglist.cgi b/buglist.cgi index 6427180e9..5cae83b87 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -395,8 +395,24 @@ if ($::FORM{'keywords'}) { } if (@list) { $query =~ s/where/, keywords where/; - $query .= "and keywords.bug_id = bugs.bug_id and (" . - join(" $::FORM{'keywords_type'} ", @list) . ")\n"; + my $type = $::FORM{'keywords_type'}; + my $notopt = ""; + if ($type eq "nowords") { + # Ought to take advantage of keyword table somehow! ### + my $extra = GetByWordList("bugs.keywords", $::FORM{'keywords'}, + "or"); + $extra =~ s/AND/AND NOT/i; + $query .= $extra; + } else { + $query .= "and keywords.bug_id = bugs.bug_id and $notopt (" . + join(" or ", @list) . ")\n"; + if ($type eq "allwords") { + # This needs to be tuned to take better advantage of the + # keyword table! + $query .= GetByWordList("bugs.keywords", $::FORM{'keywords'}, + "and"); + } + } } } |
