From fde6d4aa81a56418ae5cdfd16a6b917534d66bed Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 1 Feb 2010 15:52:24 -0800 Subject: Bug 514970: Clean up duplicates.cgi and make it use Bug objects r=LpSolit, a=LpSolit --- Bugzilla/User.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 59324383f..06c6be5cb 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -810,8 +810,8 @@ sub get_enterable_products { } sub can_access_product { - my ($self, $product_name) = @_; - + my ($self, $product) = @_; + my $product_name = blessed($product) ? $product->name : $product; return scalar(grep {$_->name eq $product_name} @{$self->get_accessible_products}); } @@ -2055,10 +2055,11 @@ the database again. Used mostly by L. Returns: an array of product objects. -=item C +=item C -Returns 1 if the user can search or enter bugs into the specified product, -and 0 if the user should not be aware of the existence of the product. +Returns 1 if the user can search or enter bugs into the specified product +(either a L or a product name), and 0 if the user should +not be aware of the existence of the product. =item C -- cgit v1.2.3-24-g4f1b