summaryrefslogtreecommitdiffstats
path: root/votes.cgi
diff options
context:
space:
mode:
authorVladimir Panteleev <github.private@thecybershadow.net>2018-04-08 05:57:06 +0200
committerDylan William Hardison <dylan@hardison.net>2018-04-08 05:57:06 +0200
commitb0935c1e52eea1dfc70652bf6fcb7c8b856a8826 (patch)
tree2400c507178262779288c10ccdfc773d858da098 /votes.cgi
parent2d80cea9010f694524f5d165a19697c47535d779 (diff)
downloadbugzilla-b0935c1e52eea1dfc70652bf6fcb7c8b856a8826.tar.gz
bugzilla-b0935c1e52eea1dfc70652bf6fcb7c8b856a8826.tar.xz
Bug 1446236 - Add & use simpler method to check if an extension is present (#35)
Diffstat (limited to 'votes.cgi')
-rwxr-xr-xvotes.cgi3
1 files changed, 1 insertions, 2 deletions
diff --git a/votes.cgi b/votes.cgi
index d9dba1541..7c1fff67a 100755
--- a/votes.cgi
+++ b/votes.cgi
@@ -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';