Skip to content

Commit 60c7e94

Browse files
committed
votes.cgi: Use has_extension
1 parent b0f0bda commit 60c7e94

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

votes.cgi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ use lib qw(. lib local/lib/perl5);
3030
use Bugzilla;
3131
use Bugzilla::Error;
3232

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

3635
my $cgi = Bugzilla->cgi;
3736
my $action = $cgi->param('action') || 'show_user';

0 commit comments

Comments
 (0)