From: bbaetz%student.usyd.edu.au <> Date: Tue, 18 Jun 2002 17:25:59 +0000 (+0000) Subject: Bug 152541 - After deleting remembered query it is still in page footer X-Git-Tag: bugzilla-2.17.1~302 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5480fdda930ecb8bf33c89b5101bcf7b91207785;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 06eff56054..39af663345 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1061,6 +1061,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";