summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-07-07 03:58:10 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-07-07 03:58:10 +0200
commit814b24fdc9407a741967322041ff817665f8e00b (patch)
tree8137af19b7fbb04b8966c959f56b78be98b4e404 /enter_bug.cgi
parentef414f2b12f7686ad830fb884f69865cdb41f6c0 (diff)
downloadbugzilla-814b24fdc9407a741967322041ff817665f8e00b.tar.gz
bugzilla-814b24fdc9407a741967322041ff817665f8e00b.tar.xz
Bug 519835: Remove Bugzilla::Product::check_product() in favor of Bugzilla::Product->check()
r=mkanat a=LpSolit
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi7
1 files changed, 1 insertions, 6 deletions
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