summaryrefslogtreecommitdiffstats
path: root/reports.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-03 06:12:07 +0200
committerlpsolit%gmail.com <>2005-09-03 06:12:07 +0200
commit6b44875b901ac8d1d7383fed017c973a9f954051 (patch)
tree0b43db0b62321cc03c91caad4810d4660c2fd56c /reports.cgi
parent3c36f0414886baad1a59db8d0dbd0efd3fec2254 (diff)
downloadbugzilla-6b44875b901ac8d1d7383fed017c973a9f954051.tar.gz
bugzilla-6b44875b901ac8d1d7383fed017c973a9f954051.tar.xz
Bug 286158: Remove GetSelectableProducts() from globals.pl and use Bugzilla::User::get_selectable_products() instead - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel,kiko a=justdave
Diffstat (limited to 'reports.cgi')
-rwxr-xr-xreports.cgi5
1 files changed, 3 insertions, 2 deletions
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')) {