diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-07-16 11:41:42 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-07-16 11:41:42 +0200 |
commit | 7edcb0dc22c61bed763581d91295c4edae72c17f (patch) | |
tree | 8f9f5c27740d29d6709059eaae6e39cfe0c444ab /votes.cgi | |
parent | af968de8d04f9b3d38a1be9e4f02624b55ff54f1 (diff) | |
download | bugzilla-7edcb0dc22c61bed763581d91295c4edae72c17f.tar.gz bugzilla-7edcb0dc22c61bed763581d91295c4edae72c17f.tar.xz |
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
Diffstat (limited to 'votes.cgi')
-rwxr-xr-x | votes.cgi | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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'); |