summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-21 06:46:46 +0200
committerbugreport%peshkin.net <>2004-07-21 06:46:46 +0200
commit899f61d64550dfd9452972cea600505cc8c7d4e3 (patch)
tree344035c8399a1496554817321a98430ba0a272c9 /Bugzilla
parent9bbbeca380788e11cbc57b310988b16d6b77586a (diff)
downloadbugzilla-899f61d64550dfd9452972cea600505cc8c7d4e3.tar.gz
bugzilla-899f61d64550dfd9452972cea600505cc8c7d4e3.tar.xz
Bug 245272: Add per-chart negation to boolean searches
r=justdave,myk,timeless a=myk
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 261e1ae0a..bf81451ae 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -1049,6 +1049,7 @@ sub init {
$chart < 0 || $params->param("field$chart-0-0") ;
$chart++) {
$chartid = $chart >= 0 ? $chart : "";
+ my @chartandlist = ();
for ($row = 0 ;
$params->param("field$chart-$row-0") ;
$row++) {
@@ -1111,7 +1112,14 @@ sub init {
}
if (@orlist) {
@orlist = map("($_)", @orlist) if (scalar(@orlist) > 1);
- push(@andlist, "(" . join(" OR ", @orlist) . ")");
+ push(@chartandlist, "(" . join(" OR ", @orlist) . ")");
+ }
+ }
+ if (@chartandlist) {
+ if ($params->param("negate$chart")) {
+ push(@andlist, "NOT(" . join(" AND ", @chartandlist) . ")");
+ } else {
+ push(@andlist, "(" . join(" AND ", @chartandlist) . ")");
}
}
}