From f41c4ade2c9d496a3362037d3ee0a1500987e4d6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 12 Feb 2010 13:08:15 +0100 Subject: [PATCH] =?utf8?q?STDOUT=20erneut=20=C3=B6ffnen=20und=20UTF8-Flag?= =?utf8?q?=20und=20FastCGI=20gefixt=20Teil=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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') { -- 2.20.1