X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=e5b1e745906d36873c7973d646a3a89c905a3f5f;hb=c63ec91efe68a157be6eba097729c8cbe27b4fc8;hp=f162f20955dd94a846d9e52ae3973e78c16c46cc;hpb=2a496ad85e9117b7cfaaa315b208f478eba30ffd;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index f162f2095..e5b1e7459 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1037,9 +1037,10 @@ sub parse_template { copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file; if ($copy_to_webdav) { - my $error = Common::copy_file_to_webdav_folder($self); - chdir("$self->{cwd}"); - $self->error($error) if $error; + if (my $error = Common::copy_file_to_webdav_folder($self)) { + chdir("$self->{cwd}"); + $self->error($error); + } } if (!$self->{preview} && $self->doc_storage_enabled) @@ -1056,9 +1057,10 @@ sub parse_template { } if ($copy_to_webdav) { - my $error = Common::copy_file_to_webdav_folder($self); - chdir("$self->{cwd}"); - $self->error($error) if $error; + if (my $error = Common::copy_file_to_webdav_folder($self)) { + chdir("$self->{cwd}"); + $self->error($error); + } } if ( !$self->{preview} && $ext_for_format eq 'pdf' && $self->doc_storage_enabled) { @@ -1870,7 +1872,7 @@ sub add_shipto { my @values; foreach my $item (qw(name department_1 department_2 street zipcode city country gln - contact cp_gender phone fax email)) { + contact phone fax email)) { if ($self->{"shipto$item"}) { $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"}); }