From: Sven Schöling Date: Fri, 23 Sep 2011 14:15:16 +0000 (+0200) Subject: STDOUT nicht neu aufmachen X-Git-Tag: release-2.7.0beta1~264 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=56a13992f2f40a679a03774c43b1f559a80a34cc;p=kivitendo-erp.git STDOUT nicht neu aufmachen --- diff --git a/SL/Form.pm b/SL/Form.pm index 68b168127..2116adb55 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1323,7 +1323,7 @@ sub parse_template { if ($self->{OUT}) { open(OUT, ">", $self->{OUT}) or $self->error("$self->{OUT} : $!"); } else { - open(OUT, ">&", \*STDOUT) or $self->error("STDOUT : $!"); + *OUT = ($::dispatcher->get_standard_filehandles)[1]; $self->header; } @@ -1332,7 +1332,7 @@ sub parse_template { $self->error("$self->{IN} : " . $template->get_error()); } - close OUT; + close OUT if $self->{OUT}; if ($self->{media} eq 'file') { copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;