aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-06 13:12:04 +0000
committermkanat%bugzilla.org <>2006-07-06 13:12:04 +0000
commitf162521444148d622df3b42a8304b6cce8f2150e (patch)
tree78cf6a0bfad99a4f053c998b98efe36929475005 /votes.cgi
parentBug 343702: editflagtypes.cgi: Argument "" isn't numeric in numeric gt (>) at... (diff)
downloadbugzilla-f162521444148d622df3b42a8304b6cce8f2150e.tar.gz
bugzilla-f162521444148d622df3b42a8304b6cce8f2150e.tar.bz2
bugzilla-f162521444148d622df3b42a8304b6cce8f2150e.zip
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 'votes.cgi')
-rwxr-xr-xvotes.cgi8
1 files changed, 6 insertions, 2 deletions
diff --git a/votes.cgi b/votes.cgi
index 6f01f6345..016e6ad67 100755
--- a/votes.cgi
+++ b/votes.cgi
@@ -38,8 +38,7 @@ use Bugzilla::Product;
use List::Util qw(min);
my $cgi = Bugzilla->cgi;
-my $template = Bugzilla->template;
-my $vars = {};
+local our $vars = {};
# If the action is show_bug, you need a bug_id.
# If the action is show_user, you can supply a userid to show the votes for
@@ -94,6 +93,8 @@ exit;
sub show_bug {
my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh;
+ my $template = Bugzilla->template;
+ my $bug_id = $cgi->param('bug_id');
ThrowCodeError("missing_bug_id") unless defined $bug_id;
@@ -117,6 +118,8 @@ sub show_user {
my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh;
my $user = Bugzilla->user;
+ my $template = Bugzilla->template;
+ my $bug_id = $cgi->param('bug_id');
# If a bug_id is given, and we're editing, we'll add it to the votes list.
$bug_id ||= "";
@@ -215,6 +218,7 @@ sub record_votes {
my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh;
+ my $template = Bugzilla->template;
# Build a list of bug IDs for which votes have been submitted. Votes
# are submitted in form fields in which the field names are the bug