aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'chart.cgi')
-rwxr-xr-xchart.cgi10
1 files changed, 7 insertions, 3 deletions
diff --git a/chart.cgi b/chart.cgi
index fd7025855..680eeb7b5 100755
--- a/chart.cgi
+++ b/chart.cgi
@@ -53,9 +53,13 @@ use Bugzilla::Chart;
use Bugzilla::Series;
use Bugzilla::User;
-my $cgi = Bugzilla->cgi;
-my $template = Bugzilla->template;
-my $vars = {};
+# For most scripts we don't make $cgi and $template global variables. But
+# when preparing Bugzilla for mod_perl, this script used these
+# variables in so many subroutines that it was easier to just
+# make them globals.
+local our $cgi = Bugzilla->cgi;
+local our $template = Bugzilla->template;
+local our $vars = {};
# Go back to query.cgi if we are adding a boolean chart parameter.
if (grep(/^cmd-/, $cgi->param())) {