From: Moritz Bunkus Date: Fri, 17 Aug 2012 09:57:08 +0000 (+0200) Subject: SQL-Upgrade: '@encoding' als Alias für '@charset' erkennen X-Git-Tag: release-3.0.0beta1~290 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=dcaf9754bac8b40319cbb62b6577fb2d2569aac7;p=kivitendo-erp.git SQL-Upgrade: '@encoding' als Alias für '@charset' erkennen --- diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index dfd5536b2..be7c54f5b 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -74,7 +74,7 @@ sub parse_dbupdate_controls { next if ($control->{ignore}); - $control->{charset} ||= Common::DEFAULT_CHARSET; + $control->{charset} = $control->{charset} || $control->{encoding} || Common::DEFAULT_CHARSET; if (!$control->{"tag"}) { _control_error($form, $file_name, $locale->text("Missing 'tag' field.")) ; @@ -136,7 +136,7 @@ sub process_query { my $file_charset = Common::DEFAULT_CHARSET; while (<$fh>) { last if !/^--/; - next if !/^--\s*\@charset:\s*(.+)/; + next if !/^--\s*\@(?:charset|encoding):\s*(.+)/; $file_charset = $1; last; } @@ -233,7 +233,7 @@ sub process_perl_script { } else { while (<$fh>) { last if !/^--/; - next if !/^--\s*\@charset:\s*(.+)/; + next if !/^--\s*\@(?:charset|encoding):\s*(.+)/; $file_charset = $1; last; } @@ -547,8 +547,10 @@ 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 missing. +The charset this file uses. Defaults to C if +missing. Both terms are recognized. =item priority