summaryrefslogtreecommitdiffstats
path: root/reports.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-06 15:12:04 +0200
committermkanat%bugzilla.org <>2006-07-06 15:12:04 +0200
commitf162521444148d622df3b42a8304b6cce8f2150e (patch)
tree78cf6a0bfad99a4f053c998b98efe36929475005 /reports.cgi
parent5e55e7bc89682617a14d5fbc3b6098c12ce1aece (diff)
downloadbugzilla-f162521444148d622df3b42a8304b6cce8f2150e.tar.gz
bugzilla-f162521444148d622df3b42a8304b6cce8f2150e.tar.xz
Bug 173629: Clean up "my" variable scoping issues for mod_perl
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'reports.cgi')
-rwxr-xr-xreports.cgi11
1 files changed, 7 insertions, 4 deletions
diff --git a/reports.cgi b/reports.cgi
index 6c7a4ea39..9df5824d7 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -47,8 +47,8 @@ $@ && ThrowCodeError("gd_not_installed");
eval "use Chart::Lines";
$@ && ThrowCodeError("chart_lines_not_installed");
-my $dir = bz_locations()->{'datadir'} . "/mining";
-my $graph_dir = "graphs";
+local our $dir = bz_locations()->{'datadir'} . "/mining";
+local our $graph_dir = bz_locations()->{'libpath'} . "/graphs";
# 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.
@@ -58,7 +58,7 @@ Bugzilla->switch_to_shadow_db();
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
-my $vars = {};
+local our $vars = {};
# We only want those products that the user has permissions for.
my @myproducts;
@@ -101,7 +101,9 @@ if (! defined $cgi->param('product')) {
sub choose_product {
my @myproducts = (@_);
-
+ my $cgi = Bugzilla->cgi;
+ my $template = Bugzilla->template;
+
my $datafile = daily_stats_filename('-All-');
# Can we do bug charts?
@@ -182,6 +184,7 @@ sub daily_stats_filename {
sub show_chart {
my ($product) = @_;
+ my $cgi = Bugzilla->cgi;
if (! defined $cgi->param('datasets')) {
ThrowUserError("missing_datasets", $vars);