summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuglist.cgi10
-rw-r--r--template/en/default/global/user-error.html.tmpl4
2 files changed, 9 insertions, 5 deletions
diff --git a/buglist.cgi b/buglist.cgi
index d1a3c665b..0871a8c54 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -179,7 +179,11 @@ sub LookupNamedQuery {
my $qname = SqlQuote($name);
SendSQL("SELECT query FROM namedqueries WHERE userid = $userid AND name = $qname");
my $result = FetchOneColumn();
- $result || ThrowUserError("missing_query", {'queryname' => $name});
+
+ defined($result) || ThrowUserError("missing_query", {'queryname' => $name});
+ $result
+ || ThrowUserError("buglist_parameters_required", {'queryname' => $name});
+
return $result;
}
@@ -331,8 +335,10 @@ elsif (($::FORM{'cmdtype'} eq "doit") && $::FORM{'remtype'}) {
$name !~ /[<>&]/ || ThrowUserError("illegal_query_name");
my $qname = SqlQuote($name);
+ $::FORM{'newquery'} || ThrowUserError("buglist_parameters_required",
+ {'queryname' => $name});
my $qbuffer = SqlQuote($::FORM{'newquery'});
-
+
my $tofooter = 1;
$vars->{'message'} = "buglist_new_named_query";
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 3fa735cc3..1577619ee 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -118,9 +118,7 @@
[% ELSIF error == "buglist_parameters_required" %]
[% title = "Parameters Required" %]
- [% url = "query.cgi" %]
- [% link = "Please use the search form to specify some search criteria." %]
- This script is not meant to be invoked without any search terms.
+ You may not search, or create saved searches, without any search terms.
[% ELSIF error == "bugs_not_changed" %]
[% title = BLOCK %][% terms.Bugs %] Not Changed[% END %]