From: Moritz Bunkus Date: Wed, 3 Jul 2013 08:20:07 +0000 (+0200) Subject: Temporäre Datei zum richtigen Zeitpunkt in WebDAV-Ordner kopieren X-Git-Tag: release-3.1.0beta1~220 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=91ea4ec22d12056bb23255281c1afd861a8cfe59;p=kivitendo-erp.git Temporäre Datei zum richtigen Zeitpunkt in WebDAV-Ordner kopieren --- 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;