From 2226c63d16c899e7d37276c20abfc49c7e336060 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Sun, 25 May 2003 22:26:04 +0000 Subject: [PATCH] Bug 207085 Updating a stored query shouldn't return the same message as creating one r=kiko git-svn-id: svn://10.0.0.236/trunk@142906 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/buglist.cgi | 10 +++++++--- .../template/en/default/global/messages.html.tmpl | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mozilla/webtools/bugzilla/buglist.cgi b/mozilla/webtools/bugzilla/buglist.cgi index 7a2c894bfde..d0469cacec5 100755 --- a/mozilla/webtools/bugzilla/buglist.cgi +++ b/mozilla/webtools/bugzilla/buglist.cgi @@ -329,11 +329,16 @@ elsif ($::FORM{'cmdtype'} eq "doit" && $::FORM{'remember'}) { } my $new_in_footer = $tofooter; + $vars->{'message'} = "buglist_new_named_query"; # 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 && $query->{'linkinfooter'} == 1) { - $new_in_footer = 0; + if ($query->{'name'} eq $name) { + $vars->{'message'} = "buglist_updated_named_query"; + if ($query->{'linkinfooter'} == 1) { + $new_in_footer = 0; + } + break; } } @@ -344,7 +349,6 @@ elsif ($::FORM{'cmdtype'} eq "doit" && $::FORM{'remember'}) { push(@{$vars->{'user'}{'queries'}}, \%query); } - $vars->{'message'} = "buglist_new_named_query"; $vars->{'queryname'} = $name; } } diff --git a/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl index 482f7e35f60..13136d6cfb4 100644 --- a/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl @@ -36,10 +36,15 @@ [% title = "Adding field to query page..." %] [% link = "Click here if the page does not redisplay automatically." %] [% # --- %] + [% ELSIF message_tag == "buglist_load_named_query" %] [% title = BLOCK %]Loading your query named [% namedcmd %][% END %] [% link = "Click here if the page does not redisplay automatically." %] [% # --- %] + + [% ELSIF message_tag == "buglist_updated_named_query" %] + OK, your query named [% queryname FILTER html %] is updated. + [% ELSIF message_tag == "buglist_new_default_query" %] OK, you now have a new default query. You may also bookmark the result of any individual query.