diff options
author | lpsolit%gmail.com <> | 2005-10-12 09:08:54 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-10-12 09:08:54 +0000 |
commit | 2ecd676f8e8154f6364a3a158013250695ed9251 (patch) | |
tree | a5444c151d610a2d8a4751b4ffde88739624a259 /describecomponents.cgi | |
parent | Bug 303699: Eliminate deprecated Bugzilla::DB routines from userprefs.cgi - P... (diff) | |
download | bugzilla-2ecd676f8e8154f6364a3a158013250695ed9251.tar.gz bugzilla-2ecd676f8e8154f6364a3a158013250695ed9251.tar.bz2 bugzilla-2ecd676f8e8154f6364a3a158013250695ed9251.zip |
Bug 306325: Move CanEnterProduct() and CanEnterProductOrWarn() out of globals.pl - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel r=wicked a=justdave
Diffstat (limited to 'describecomponents.cgi')
-rwxr-xr-x | describecomponents.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/describecomponents.cgi b/describecomponents.cgi index 9602c0fe0..8fec1ec26 100755 --- a/describecomponents.cgi +++ b/describecomponents.cgi @@ -30,7 +30,7 @@ require "globals.pl"; use vars qw($vars @legal_product); -Bugzilla->login(); +my $user = Bugzilla->login(); GetVersionTable(); @@ -39,7 +39,7 @@ my $template = Bugzilla->template; my $product = trim($cgi->param('product') || ''); my $product_id = get_product_id($product); -if (!$product_id || !CanEnterProduct($product)) { +if (!$product_id || !$user->can_enter_product($product)) { # Reference to a subset of %::proddesc, which the user is allowed to see my %products; @@ -47,7 +47,7 @@ if (!$product_id || !CanEnterProduct($product)) { # OK, now only add products the user can see Bugzilla->login(LOGIN_REQUIRED); foreach my $p (@::legal_product) { - if (CanEnterProduct($p)) { + if ($user->can_enter_product($p)) { $products{$p} = $::proddesc{$p}; } } |