Skip to content

Commit

Permalink
votes.cgi: Use has_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberShadow committed Nov 3, 2020
1 parent b0f0bda commit 60c7e94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions votes.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ use lib qw(. lib local/lib/perl5);
use Bugzilla;
use Bugzilla::Error;

my $is_enabled = grep { $_->NAME eq 'Voting' } @{Bugzilla->extensions};
$is_enabled || ThrowCodeError('extension_disabled', {name => 'Voting'});
Bugzilla->has_extension('Voting') || ThrowCodeError('extension_disabled', { name => 'Voting' });

my $cgi = Bugzilla->cgi;
my $action = $cgi->param('action') || 'show_user';
Expand Down

0 comments on commit 60c7e94

Please sign in to comment.