From 814b24fdc9407a741967322041ff817665f8e00b Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 7 Jul 2010 03:58:10 +0200 Subject: Bug 519835: Remove Bugzilla::Product::check_product() in favor of Bugzilla::Product->check() r=mkanat a=LpSolit --- enter_bug.cgi | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'enter_bug.cgi') diff --git a/enter_bug.cgi b/enter_bug.cgi index 64b239628..b1889cd03 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -153,15 +153,10 @@ if ($product_name eq '') { $product = $enterable_products[0]; } } -else { - # Do not use Bugzilla::Product::check_product() here, else the user - # could know whether the product doesn't exist or is not accessible. - $product = new Bugzilla::Product({'name' => $product_name}); -} # We need to check and make sure that the user has permission # to enter a bug against this product. -$user->can_enter_product($product ? $product->name : $product_name, THROW_ERROR); +$product = $user->can_enter_product($product || $product_name, THROW_ERROR); ############################################################################## # Useful Subroutines -- cgit v1.2.3-24-g4f1b