summaryrefslogtreecommitdiffstats
path: root/reports.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'reports.cgi')
-rwxr-xr-xreports.cgi15
1 files changed, 7 insertions, 8 deletions
diff --git a/reports.cgi b/reports.cgi
index 6eb4496cc..b53d9521e 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -45,19 +45,18 @@ use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Status;
-eval "use GD";
-$@ && ThrowCodeError("gd_not_installed");
-eval "use Chart::Lines";
-$@ && ThrowCodeError("chart_lines_not_installed");
+# If we're using bug groups for products, we should apply those restrictions
+# to viewing reports, as well. Time to check the login in that case.
+my $user = Bugzilla->login();
+
+if (!Bugzilla->feature('old_charts')) {
+ ThrowCodeError('feature_disabled', { feature => 'old_charts' });
+}
my $dir = bz_locations()->{'datadir'} . "/mining";
my $graph_url = 'graphs';
my $graph_dir = bz_locations()->{'libpath'} . '/' .$graph_url;
-# If we're using bug groups for products, we should apply those restrictions
-# to viewing reports, as well. Time to check the login in that case.
-my $user = Bugzilla->login();
-
Bugzilla->switch_to_shadow_db();
my $cgi = Bugzilla->cgi;