summaryrefslogtreecommitdiffstats
path: root/editflagtypes.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 /editflagtypes.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 'editflagtypes.cgi')
-rwxr-xr-xeditflagtypes.cgi15
1 files changed, 8 insertions, 7 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi
index 825fa1eb5..61dafa923 100755
--- a/editflagtypes.cgi
+++ b/editflagtypes.cgi
@@ -44,8 +44,9 @@ use Bugzilla::Attachment;
use List::Util qw(reduce);
-my $template = Bugzilla->template;
-my $vars = {};
+local our $cgi = Bugzilla->cgi;
+local our $template = Bugzilla->template;
+local our $vars = {};
# Make sure the user is logged in and is an administrator.
my $user = Bugzilla->login(LOGIN_REQUIRED);
@@ -54,8 +55,6 @@ $user->in_group('editcomponents')
action => "edit",
object => "flagtypes"});
-my $cgi = Bugzilla->cgi;
-
################################################################################
# Main Body Execution
################################################################################
@@ -75,9 +74,9 @@ if (@categoryActions = grep(/^categoryAction-.+/, $cgi->param())) {
}
if ($action eq 'list') { list(); }
-elsif ($action eq 'enter') { edit(); }
-elsif ($action eq 'copy') { edit(); }
-elsif ($action eq 'edit') { edit(); }
+elsif ($action eq 'enter') { edit($action); }
+elsif ($action eq 'copy') { edit($action); }
+elsif ($action eq 'edit') { edit($action); }
elsif ($action eq 'insert') { insert(); }
elsif ($action eq 'update') { update(); }
elsif ($action eq 'confirmdelete') { confirmDelete(); }
@@ -167,6 +166,7 @@ sub list {
sub edit {
+ my ($action) = @_;
$action eq 'enter' ? validateTargetType() : (my $id = validateID());
my $dbh = Bugzilla->dbh;
@@ -365,6 +365,7 @@ sub update {
validateGroups();
my $dbh = Bugzilla->dbh;
+ my $user = Bugzilla->user;
$dbh->bz_lock_tables('flagtypes WRITE', 'products READ',
'components READ', 'flaginclusions WRITE',
'flagexclusions WRITE');