From: Moritz Bunkus Date: Fri, 12 Feb 2010 12:08:15 +0000 (+0100) Subject: STDOUT erneut öffnen und UTF8-Flag und FastCGI gefixt Teil 2 X-Git-Tag: release-2.6.2beta1~280 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f41c4ade2c9d496a3362037d3ee0a1500987e4d6;p=kivitendo-erp.git STDOUT erneut öffnen und UTF8-Flag und FastCGI gefixt Teil 2 --- diff --git a/SL/Form.pm b/SL/Form.pm index 6fa51321a..b0e25d70d 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1259,20 +1259,23 @@ sub parse_template { $self->{OUT} = ">$self->{tmpfile}"; } + my $result; + if ($self->{OUT}) { - open(OUT, "$self->{OUT}") or $self->error("$self->{OUT} : $!"); + open OUT, "$self->{OUT}" or $self->error("$self->{OUT} : $!"); + $result = $template->parse(*OUT); + close OUT; + } else { - open(OUT, ">-") or $self->error("STDOUT : $!"); $self->header; + $result = $template->parse(*STDOUT); } - if (!$template->parse(*OUT)) { + if (!$result) { $self->cleanup(); $self->error("$self->{IN} : " . $template->get_error()); } - close(OUT); - if ($template->uses_temp_file() || $self->{media} eq 'email') { if ($self->{media} eq 'email') {