Commit 7edcb0dc authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 578258: Calling votes.cgi with no arguments should either display the user's…

Bug 578258: Calling votes.cgi with no arguments should either display the user's votes, or give a better error message if the extension is disabled r/a=mkanat
parent af968de8
......@@ -147,6 +147,11 @@
address.
[% END %]
[% ELSIF error == "extension_disabled" %]
[% title = "Extension Disabled" %]
You cannot access this page because the extension '[% name FILTER html %]'
is disabled.
[% ELSIF error == "extension_must_be_subclass" %]
<code>[% package FILTER html %]</code> from
<code>[% filename FILTER html %]</code> is not a subclass of
......
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment