aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2015-07-11 15:27:33 +0200
committerChristian Ruppert <idl0r@gentoo.org>2015-07-11 15:27:33 +0200
commit4b2ce2725e9a4525e273fb1b08243aad74770a3d (patch)
treec90fb0fef5c9ac923817f908f1c3586efa47ec59 /describekeywords.cgi
parentBumped version to 4.4.9 (diff)
downloadbugzilla-4b2ce2725e9a4525e273fb1b08243aad74770a3d.tar.gz
bugzilla-4b2ce2725e9a4525e273fb1b08243aad74770a3d.tar.bz2
bugzilla-4b2ce2725e9a4525e273fb1b08243aad74770a3d.zip
Vanilla 4.4.9 to 5.0 without history due to massive merge conflicts
Diffstat (limited to 'describekeywords.cgi')
-rwxr-xr-xdescribekeywords.cgi10
1 files changed, 7 insertions, 3 deletions
diff --git a/describekeywords.cgi b/describekeywords.cgi
index b67b9c3d9..31bf0c13e 100755
--- a/describekeywords.cgi
+++ b/describekeywords.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -wT
+#!/usr/bin/perl -T
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -6,12 +6,14 @@
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
+use 5.10.1;
use strict;
+use warnings;
+
use lib qw(. lib);
use Bugzilla;
use Bugzilla::Error;
-use Bugzilla::User;
use Bugzilla::Keyword;
my $user = Bugzilla->login();
@@ -24,7 +26,9 @@ my $vars = {};
Bugzilla->switch_to_shadow_db;
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
-$vars->{'caneditkeywords'} = $user->in_group("editkeywords");
+if (!@{$vars->{keywords}}) {
+ ThrowUserError("no_keywords");
+}
print $cgi->header();
$template->process("reports/keywords.html.tmpl", $vars)