From 9c6337f3bbff812d5c0a8cdfe9ff14565f050fa5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 13 Jan 2011 13:44:55 +0100 Subject: [PATCH] parse_template: $form->{media} == 'file' bedeutet, nur Druckdatei in $form->{OUT} erstellen, nicht ausgeben Conflicts: SL/Form.pm --- SL/Form.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SL/Form.pm b/SL/Form.pm index e1646e69d..db9b5033d 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -43,6 +43,7 @@ use CGI; use CGI::Ajax; use Cwd; use Encode; +use File::Copy; use IO::File; use SL::Auth; use SL::Auth::DB; @@ -1269,6 +1270,16 @@ sub parse_template { $self->error("$self->{IN} : " . $template->get_error()); } + if ($self->{media} eq 'file') { + copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file; + $self->cleanup; + chdir("$self->{cwd}"); + + $::lxdebug->leave_sub(); + + return; + } + if ($template->uses_temp_file() || $self->{media} eq 'email') { if ($self->{media} eq 'email') { -- 2.20.1