diff --git a/webtools/bugzilla/buglist.cgi b/webtools/bugzilla/buglist.cgi index 4c1719d999e1..1dfe52e5aa46 100755 --- a/webtools/bugzilla/buglist.cgi +++ b/webtools/bugzilla/buglist.cgi @@ -1124,7 +1124,7 @@ CMD: for ($::FORM{'cmdtype'}) { # Don't add it to the list if they are reusing an existing query name. foreach my $query (@{$vars->{'user'}{'queries'}}) { - if ($query->{'name'} eq $name) { + if ($query->{'name'} eq $name && $query->{'linkinfooter'} == 1) { $new_in_footer = 0; } } @@ -1132,7 +1132,10 @@ CMD: for ($::FORM{'cmdtype'}) { print "Content-Type: text/html\n\n"; # Generate and return the UI (HTML page) from the appropriate template. if ($new_in_footer) { - push(@{$vars->{'user'}{'queries'}}, {name => $name}); + my %query = (name => $name, + query => $::buffer, + linkinfooter => $tofooter); + push(@{$vars->{'user'}{'queries'}}, \%query); } $vars->{'title'} = "OK, query saved."; diff --git a/webtools/bugzilla/template/en/default/global/useful-links.html.tmpl b/webtools/bugzilla/template/en/default/global/useful-links.html.tmpl index 90704de1cfbe..5db6333edb6d 100644 --- a/webtools/bugzilla/template/en/default/global/useful-links.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/useful-links.html.tmpl @@ -97,7 +97,7 @@ [% IF user.showmybugslink %] - My Bugs + My Bugs [% print_pipe = 1 %] [% END %] @@ -105,7 +105,7 @@ [% FOREACH q = user.queries %] [% IF q.linkinfooter %] [% " | " IF print_pipe %] - [% q.name FILTER no_break FILTER html %] + [% q.name FILTER html FILTER no_break %] [% print_pipe = 1 %] [% END %]