From 6b44875b901ac8d1d7383fed017c973a9f954051 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 3 Sep 2005 04:12:07 +0000 Subject: Bug 286158: Remove GetSelectableProducts() from globals.pl and use Bugzilla::User::get_selectable_products() instead - Patch by Frédéric Buclin r=joel,kiko a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reports.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'reports.cgi') diff --git a/reports.cgi b/reports.cgi index 7274ea8e2..c060045eb 100755 --- a/reports.cgi +++ b/reports.cgi @@ -54,7 +54,7 @@ use Bugzilla; # If we're using bug groups for products, we should apply those restrictions # to viewing reports, as well. Time to check the login in that case. -Bugzilla->login(); +my $user = Bugzilla->login(); GetVersionTable(); @@ -66,7 +66,8 @@ my $template = Bugzilla->template; # We only want those products that the user has permissions for. my @myproducts; push( @myproducts, "-All-"); -push( @myproducts, GetSelectableProducts()); +# Extract product names from objects and add them to the list. +push( @myproducts, map { $_->name } @{$user->get_selectable_products} ); if (! defined $cgi->param('product')) { -- cgit v1.2.3-24-g4f1b