Bug 152541 - After deleting remembered query it is still in page footer

r=jouni x2


git-svn-id: svn://10.0.0.236/trunk@123500 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bbaetz%student.usyd.edu.au 2002-06-18 10:26:34 +00:00
parent 029d6ccdd3
commit 5c988c2ba0

View File

@ -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";