From: jocuri%softhome.net <> Date: Thu, 9 Dec 2004 17:22:03 +0000 (+0000) Subject: Patch for bug 233049: Improve error when filtering requests with component not in... X-Git-Tag: bugzilla-2.18~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=def3beafc23e4478df271e4e0cd5960588e9b70d;p=thirdparty%2Fbugzilla.git Patch for bug 233049: Improve error when filtering requests with component not in the selected product; patch by Marc Schumann , r=vladd, a=justdave. --- diff --git a/request.cgi b/request.cgi index 047c4fa143..cffad983fa 100755 --- a/request.cgi +++ b/request.cgi @@ -168,10 +168,11 @@ sub queue { push(@criteria, "bugs.component_id = $component_id"); push(@excluded_columns, 'component') unless $cgi->param('do_union'); } - else { ThrowCodeError("unknown_component", { component => $cgi->param('component') }) } + else { ThrowUserError("component_not_valid", { 'product' => $cgi->param('product'), + 'name' => $cgi->param('component') }) } } } - else { ThrowCodeError("unknown_product", { product => $cgi->param('product') }) } + else { ThrowUserError("product_doesnt_exist", { 'product' => $cgi->param('product') }) } } # Filter results by flag types. diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index c5233b8e88..7919471357 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -230,14 +230,6 @@ I could not figure out what you wanted to do. [% END %] - [% ELSIF error == "unknown_component" %] - [% title = "Unknown Component" %] - There is no component named [% component FILTER html %]. - - [% ELSIF error == "unknown_product" %] - [% title = "Unknown Product" %] - There is no product named [% product FILTER html %]. - [% ELSE %] [% title = "Internal error" %] An internal error has occured, but [% terms.Bugzilla %] doesn't know