summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-11-10 07:18:47 +0100
committerbbaetz%student.usyd.edu.au <>2002-11-10 07:18:47 +0100
commit58de3fae5eeb8cc3e6ab95e789387d3c9f4f8c9e (patch)
tree60c37f769fa8622416e7bdeebabdd525f31e680e /buglist.cgi
parent3423b0f58a9e2560f63289a215978a165c94191f (diff)
downloadbugzilla-58de3fae5eeb8cc3e6ab95e789387d3c9f4f8c9e.tar.gz
bugzilla-58de3fae5eeb8cc3e6ab95e789387d3c9f4f8c9e.tar.xz
Bug 179184 - regetlastlist returns all bugs
r=gerv, a=justdave
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi20
1 files changed, 15 insertions, 5 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 0f33bee7b..32f9070cd 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -110,14 +110,21 @@ my $serverpush =
my $order = $::FORM{'order'} || "";
my $order_from_cookie = 0; # True if $order set using $::COOKIE{'LASTORDER'}
+# The params object to use for the actual query itself
+my $params;
+
# If the user is retrieving the last bug list they looked at, hack the buffer
# storing the query string so that it looks like a query retrieving those bugs.
if ($::FORM{'regetlastlist'}) {
$::COOKIE{'BUGLIST'} || ThrowUserError("missing_cookie");
- $::FORM{'bug_id'} = join(",", split(/:/, $::COOKIE{'BUGLIST'}));
$order = "reuse last sort" unless $order;
- $::buffer = "bug_id=$::FORM{'bug_id'}&order=" . url_quote($order);
+
+ # set up the params for this new query
+ $params = new Bugzilla::CGI({
+ bug_id => [split(/:/, $::COOKIE{'BUGLIST'})],
+ order => $order,
+ });
}
if ($::buffer =~ /&cmd-/) {
@@ -229,9 +236,12 @@ if ($::FORM{'cmdtype'} eq "runnamed") {
$::FORM{'remaction'} = "run";
}
-# The params object to use for the actual query itsself
-# This will be modified, so make a copy
-my $params = new Bugzilla::CGI($cgi);
+# Now we're going to be running, so ensure that the params object is set up,
+# using ||= so that we only do so if someone hasn't overridden this
+# earlier, for example by setting up a named query search.
+
+# This will be modified, so make a copy.
+$params ||= new Bugzilla::CGI($cgi);
# Take appropriate action based on user's request.
if ($::FORM{'cmdtype'} eq "dorem") {