summaryrefslogtreecommitdiffstats
path: root/votes.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'votes.cgi')
-rwxr-xr-xvotes.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/votes.cgi b/votes.cgi
index dfbadfabc..ef9227af0 100755
--- a/votes.cgi
+++ b/votes.cgi
@@ -28,10 +28,11 @@ use lib qw(. lib);
use Bugzilla;
use Bugzilla::Error;
-my $cgi = Bugzilla->cgi;
+my $is_enabled = grep { $_->NAME eq 'Voting' } @{ Bugzilla->extensions };
+$is_enabled || ThrowCodeError('extension_disabled', { name => 'Voting' });
-my $to_url;
-my $action = $cgi->param('action');
+my $cgi = Bugzilla->cgi;
+my $action = $cgi->param('action') || 'show_user';
if ($action eq "show_bug") {
$cgi->delete('action');