diff options
author | bbaetz%student.usyd.edu.au <> | 2002-06-18 19:25:59 +0200 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-06-18 19:25:59 +0200 |
commit | 5480fdda930ecb8bf33c89b5101bcf7b91207785 (patch) | |
tree | a20e72cbd4a6fa1ebf495a77ff186ea9b0f324aa /buglist.cgi | |
parent | 6ec03b9ae747701a27fa32c0f3652ecf9aa71cb5 (diff) | |
download | bugzilla-5480fdda930ecb8bf33c89b5101bcf7b91207785.tar.gz bugzilla-5480fdda930ecb8bf33c89b5101bcf7b91207785.tar.xz |
Bug 152541 - After deleting remembered query it is still in page footer
r=jouni x2
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi index 06eff5605..39af66334 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"; |