From 9569aa4b1211dbc40667a2999dd7b87304f8bd32 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 30 Jan 2013 18:52:58 +0100 Subject: [PATCH] scripts/dbupgrade2_tool.pl: UTF-8-encodierte Upgradescripte richtig behandeln --- scripts/dbupgrade2_tool.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/dbupgrade2_tool.pl b/scripts/dbupgrade2_tool.pl index 3ed2186e8..50cd27b9b 100755 --- a/scripts/dbupgrade2_tool.pl +++ b/scripts/dbupgrade2_tool.pl @@ -331,6 +331,9 @@ sub apply_upgrade { exit 0; } + my $db_charset = $::lx_office_conf{system}->{dbcharset}; + $db_charset ||= Common::DEFAULT_CHARSET(); + foreach my $control (@upgradescripts) { $control->{file} =~ /\.(sql|pl)$/; my $file_type = $1; @@ -339,9 +342,9 @@ sub apply_upgrade { print "Applying upgrade $control->{file}\n"; if ($file_type eq "sql") { - $dbupgrader->process_query($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); + $dbupgrader->process_query($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control, $db_charset); } else { - $dbupgrader->process_perl_script($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); + $dbupgrader->process_perl_script($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control, $db_charset); } } -- 2.20.1