From 91ea4ec22d12056bb23255281c1afd861a8cfe59 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 3 Jul 2013 10:20:07 +0200 Subject: [PATCH] =?utf8?q?Tempor=C3=A4re=20Datei=20zum=20richtigen=20Zeitp?= =?utf8?q?unkt=20in=20WebDAV-Ordner=20kopieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 6c3785b4d..be73c8554 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1070,11 +1070,11 @@ sub parse_template { close OUT if $self->{OUT}; - Common::copy_file_to_webdav_folder($self) if ($::instance_conf->get_webdav - and $::instance_conf->get_webdav_documents and not $self->{preview}); + my $copy_to_webdav = $::instance_conf->get_webdav && $::instance_conf->get_webdav_documents && !$self->{preview}; if ($self->{media} eq 'file') { copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file; + Common::copy_file_to_webdav_folder($self) if $copy_to_webdav; $self->cleanup; chdir("$self->{cwd}"); @@ -1083,6 +1083,8 @@ sub parse_template { return; } + Common::copy_file_to_webdav_folder($self) if $copy_to_webdav; + if ($self->{media} eq 'email') { my $mail = new Mailer; -- 2.20.1