From: bbaetz%student.usyd.edu.au <> Date: Tue, 18 Jun 2002 17:26:34 +0000 (+0000) Subject: Bug 152541 - After deleting remembered query it is still in page footer X-Git-Tag: bugzilla-2.16~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b95a9a5c36dd0bd73ff3e0acfca1e05fa6ed787;p=thirdparty%2Fbugzilla.git Bug 152541 - After deleting remembered query it is still in page footer r=jouni x2 --- diff --git a/buglist.cgi b/buglist.cgi index 5294899ecd..1db4adc206 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1068,6 +1068,16 @@ CMD: for ($::FORM{'cmdtype'}) { my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); my $qname = SqlQuote($::FORM{'namedcmd'}); SendSQL("DELETE FROM namedqueries WHERE userid = $userid AND name = $qname"); + # Now remove this query from the footer + my $count = 0; + foreach my $q (@{$::vars->{'user'}{'queries'}}) { + if ($q->{'name'} eq $::FORM{'namedcmd'}) { + splice(@{$::vars->{'user'}{'queries'}}, $count, 1); + last; + } + $count++; + } + print "Content-Type: text/html\n\n"; # Generate and return the UI (HTML page) from the appropriate template. $vars->{'title'} = "Query is gone";