summaryrefslogtreecommitdiffstats
path: root/chart.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-10-24 07:21:06 +0200
committermkanat%bugzilla.org <>2009-10-24 07:21:06 +0200
commita2dd3b00284fd4724d3408274cb1156c7a77d187 (patch)
tree4aa41a1c8cea9d31aaccddc4685f8f1c5991c1b4 /chart.cgi
parent401fb65f2e6f9031cedf47fb6d951236b5c624d3 (diff)
downloadbugzilla-a2dd3b00284fd4724d3408274cb1156c7a77d187.tar.gz
bugzilla-a2dd3b00284fd4724d3408274cb1156c7a77d187.tar.xz
Bug 520948: Use Bugzilla->feature and feature_enabled everywhere instead of checking if modules are installed
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'chart.cgi')
-rwxr-xr-xchart.cgi8
1 files changed, 6 insertions, 2 deletions
diff --git a/chart.cgi b/chart.cgi
index 1aef2a251..0b46347b5 100755
--- a/chart.cgi
+++ b/chart.cgi
@@ -65,6 +65,12 @@ local our $template = Bugzilla->template;
local our $vars = {};
my $dbh = Bugzilla->dbh;
+my $user = Bugzilla->login(LOGIN_REQUIRED);
+
+if (!Bugzilla->feature('new_charts')) {
+ ThrowCodeError('feature_disabled', { feature => 'new_charts' });
+}
+
# Go back to query.cgi if we are adding a boolean chart parameter.
if (grep(/^cmd-/, $cgi->param())) {
my $params = $cgi->canonicalise_query("format", "ctype", "action");
@@ -96,8 +102,6 @@ if ($action eq "search") {
exit;
}
-my $user = Bugzilla->login(LOGIN_REQUIRED);
-
$user->in_group(Bugzilla->params->{"chartgroup"})
|| ThrowUserError("auth_failure", {group => Bugzilla->params->{"chartgroup"},
action => "use",