From: Holger Lindemann Date: Tue, 14 Sep 2010 06:47:39 +0000 (+0200) Subject: Merge branch 'master' of ssh://lx-office/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~137^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c59d1071a67c80a1af0da53713d6e8ce71273d5f;hp=6c7e41458d2027f72901d16417a37648942f7445;p=kivitendo-erp.git Merge branch 'master' of ssh://lx-office/~/lx-office-erp --- diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 6e1a6c7f9..d8d058bc5 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -10,23 +10,23 @@ use strict; BEGIN { @required_modules = ( { name => "parent", url => "http://search.cpan.org/~corion/" }, - { name => "Archive::Zip", url => "http://search.cpan.org/~adamk/" }, - { name => "Class::Accessor", url => "http://search.cpan.org/~kasei/" }, - { name => "CGI::Ajax", url => "http://search.cpan.org/~bct/" }, + { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~adamk/" }, + { name => "Class::Accessor", version => '0.30', url => "http://search.cpan.org/~kasei/" }, + { name => "CGI::Ajax", version => '0.697', url => "http://search.cpan.org/~bct/" }, { name => "DateTime", url => "http://search.cpan.org/~drolsky/" }, - { name => "DBI", url => "http://search.cpan.org/~timb/" }, - { name => "DBD::Pg", url => "http://search.cpan.org/~dbdpg/" }, + { name => "DBI", version => '1.50', url => "http://search.cpan.org/~timb/" }, + { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/" }, { name => "Email::Address", url => "http://search.cpan.org/~rjbs/" }, { name => "FCGI", url => "http://search.cpan.org/~mstrout/" }, - { name => "IO::Wrap", url => "http://search.cpan.org/~dskoll/" }, - { name => "List::MoreUtils", url => "http://search.cpan.org/~vparseval/" }, - { name => "PDF::API2", url => "http://search.cpan.org/~areibens/" }, + { name => "IO::Wrap", version => '2.110', url => "http://search.cpan.org/~dskoll/" }, + { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/" }, + { name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/" }, { name => "Template", version => '2.18', url => "http://search.cpan.org/~abw/" }, - { name => "Text::CSV_XS", url => "http://search.cpan.org/~hmbrand/" }, - { name => "Text::Iconv", url => "http://search.cpan.org/~mpiotr/" }, - { name => "URI", url => "http://search.cpan.org/~gaas/" }, - { name => "XML::Writer", url => "http://search.cpan.org/~josephw/" }, - { name => "YAML", url => "http://search.cpan.org/~ingy/" }, + { name => "Text::CSV_XS", version => '0.23', url => "http://search.cpan.org/~hmbrand/" }, + { name => "Text::Iconv", version => '1.2', url => "http://search.cpan.org/~mpiotr/" }, + { name => "URI", version => '1.35', url => "http://search.cpan.org/~gaas/" }, + { name => "XML::Writer", version => '0.602', url => "http://search.cpan.org/~josephw/" }, + { name => "YAML", version => '0.62', url => "http://search.cpan.org/~ingy/" }, ); @optional_modules = (); diff --git a/SL/Template/OpenDocument.pm b/SL/Template/OpenDocument.pm index 626d3c0bf..2ed3c60fa 100644 --- a/SL/Template/OpenDocument.pm +++ b/SL/Template/OpenDocument.pm @@ -3,6 +3,7 @@ package SL::Template::OpenDocument; use parent qw(SL::Template::Simple); use Archive::Zip; +use Encode; use POSIX 'setsid'; use SL::Iconv; @@ -109,21 +110,27 @@ sub parse_block { $contents =~ m|^(.*?)(]*>)|; my $table_row = $1; my $end_tag = $2; - substr($contents, 0, length($1) + length($end_tag)) = ""; if ($table_row =~ m|\<\%foreachrow\s+(.*?)\%\>|) { my $var = $1; - substr($table_row, length($`), length($&)) = ""; + $contents =~ m|\<\%foreachrow\s+.*?\%\>|; + substr($contents, length($`), length($&)) = ""; - my ($t1, $t2) = $self->find_end($table_row, length($`)); - if (!$t1) { + ($table_row, $contents) = $self->find_end($contents, length($`)); + if (!$table_row) { $self->{"error"} = "Unclosed <\%foreachrow\%>." unless ($self->{"error"}); $main::lxdebug->leave_sub(); return undef; } - my $new_text = $self->parse_foreach($var, $t1 . $t2, $tag, $end_tag, @indices); + $contents =~ m|^(.*?)(]*>)|; + $table_row .= $1; + $end_tag = $2; + + substr $contents, 0, length($&), ''; + + my $new_text = $self->parse_foreach($var, $table_row, $tag, $end_tag, @indices); if (!defined($new_text)) { $main::lxdebug->leave_sub(); return undef; @@ -131,6 +138,7 @@ sub parse_block { $new_contents .= $new_text; } else { + substr($contents, 0, length($table_row) + length($end_tag)) = ""; my $new_text = $self->parse_block($table_row, @indices); if (!defined($new_text)) { $main::lxdebug->leave_sub(); @@ -221,7 +229,7 @@ sub parse { return 0; } - my $contents = $zip->contents("content.xml"); + my $contents = Encode::decode('utf-8-strict', $zip->contents("content.xml")); if (!$contents) { $self->{"error"} = "File is not a OpenDocument file."; $main::lxdebug->leave_sub(); @@ -260,7 +268,7 @@ sub parse { # $new_contents =~ s|>|>\n|g; - $zip->contents("content.xml", $new_contents); + $zip->contents("content.xml", Encode::encode('utf-8-strict', $new_contents)); my $styles = $zip->contents("styles.xml"); if ($contents) { diff --git a/modules/override/PDF/Table.pm b/modules/override/PDF/Table.pm index 7040b2958..113344d45 100644 --- a/modules/override/PDF/Table.pm +++ b/modules/override/PDF/Table.pm @@ -981,6 +981,7 @@ Stone Environmental Inc. (www.stone-env.com). The text_block() method is a slightly modified copy of the one from Rick Measham's PDF::API2 tutorial at http://pdfapi2.sourceforge.net/cgi-bin/view/Main/YourFirstDocument +update: The tutorial is no longer available. Please visit http://pdfapi2.sourceforge.net . by Desislav Kamenov