From 60c7e9468023972180a850e1836140a6549c43e0 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 4 Oct 2020 21:34:24 +0000 Subject: [PATCH] votes.cgi: Use has_extension --- votes.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/votes.cgi b/votes.cgi index 57912cd771..3cebfad37c 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';