From f162521444148d622df3b42a8304b6cce8f2150e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 6 Jul 2006 13:12:04 +0000 Subject: Bug 173629: Clean up "my" variable scoping issues for mod_perl Patch By Max Kanat-Alexander r=LpSolit, a=myk --- reports.cgi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'reports.cgi') 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); -- cgit v1.2.3-24-g4f1b