From b8851cdd5c15e0d21543d9fe08159b9ced8c950f Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Sun, 6 Oct 2002 18:52:28 +0000 Subject: Bug 163114 - Templatise all calls to DisplayError. Patch D (the last one). Patch by gerv; r=burnus. --- describecomponents.cgi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'describecomponents.cgi') diff --git a/describecomponents.cgi b/describecomponents.cgi index 7a24b692c..b4953ddc6 100755 --- a/describecomponents.cgi +++ b/describecomponents.cgi @@ -57,9 +57,7 @@ if (!defined $::FORM{'product'}) { my $prodsize = scalar(keys %products); if ($prodsize == 0) { - DisplayError("Either no products have been defined ". - "or you have not been given access to any.\n"); - exit; + ThrowUserError("no_products"); } elsif ($prodsize > 1) { $::vars->{'proddesc'} = \%products; @@ -93,8 +91,7 @@ if (!$product_id) { if (Param("usebuggroups") && GroupExists($product)) { confirm_login() unless $::userid; UserInGroup($product) - || DisplayError("You are not authorized to access that product.") - && exit; + || ThrowUserError("product_access_denied"); } ###################################################################### -- cgit v1.2.3-24-g4f1b