]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 152541 - After deleting remembered query it is still in page footer
authorbbaetz%student.usyd.edu.au <>
Tue, 18 Jun 2002 17:26:34 +0000 (17:26 +0000)
committerbbaetz%student.usyd.edu.au <>
Tue, 18 Jun 2002 17:26:34 +0000 (17:26 +0000)
r=jouni x2

buglist.cgi

index 5294899ecd4bc29d5cee2b64f4fdc0219d5f5f94..1db4adc206fd1bc3455ec8c5cc8d0b5ad517d479 100755 (executable)
@@ -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";