# 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;
}
}
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.";
<td colspan="3">
[% IF user.showmybugslink %]
- <a href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=[% user.name FILTER url_quote %]&emailtype1=exact&emailassigned_to1=1&emailreporter1=1">My Bugs
+ <a href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=[% user.login FILTER url_quote %]&emailtype1=exact&emailassigned_to1=1&emailreporter1=1">My Bugs
</a>
[% print_pipe = 1 %]
[% END %]
[% FOREACH q = user.queries %]
[% IF q.linkinfooter %]
[% " | " IF print_pipe %]
- <a href="buglist.cgi?cmdtype=runnamed&namedcmd=[% q FILTER url_quote %]">[% q.name FILTER no_break FILTER html %]
+ <a href="buglist.cgi?cmdtype=runnamed&namedcmd=[% q.name FILTER url_quote %]">[% q.name FILTER html FILTER no_break %]
</a>
[% print_pipe = 1 %]
[% END %]