From 8f7283f501b3ddc2809d073b5d0399d20ed5af06 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 6 May 2013 12:05:18 +0200 Subject: [PATCH] =?utf8?q?$::form=20nach=20Perl-Upgrade-Script-Ausf=C3=BCh?= =?utf8?q?rung=20resetten?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Siehe 87eebe6 für Begründung. --- SL/DBUpgrade2.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index d98627c56..c9bf7aba5 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -242,6 +242,8 @@ sub process_perl_script { my ($self, $dbh, $filename, $version_or_control, $db_charset) = @_; + my %form_values = map { $_ => $::form->{$_} } qw(dbconnect dbdefault dbdriver dbhost dbmbkiviunstable dbname dboptions dbpasswd dbport dbupdate dbuser login template_object version); + $dbh->begin_work; # setup dbup_ export vars & run script @@ -272,6 +274,13 @@ sub process_perl_script { } $dbh->commit(); + # Clear $::form of values that may have been set so that following + # Perl upgrade scripts won't have to work with old data (think of + # the usual 'continued' mechanism that's used for determining + # whether or not the upgrade form must be displayed). + delete @{ $::form }{ keys %{ $::form } }; + $::form->{$_} = $form_values{$_} for keys %form_values; + $::lxdebug->leave_sub(); } -- 2.20.1