X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a23454bb1b039a31b7f77710ff663fa9152d530c..7635f647ec7dcdef51684b21601ee0930ea2bc5b:/SL/DBUpgrade2.pm diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index d98627c56..6de1fd258 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(); } @@ -540,6 +549,7 @@ depends on. All other upgrades listed in C will be applied before the current one is applied. =item charset + =item encoding The charset this file uses. Defaults to C if