X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCommon.pm;h=c0bca019566e71c3e8757c8bc235631cdd7e45bb;hb=1c385c602908735c3be266b1470b301050650fd3;hp=e7bed372b670e64bce501b8d2d4aff7f346c929c;hpb=6a8787147ad643549eb26cb4f9a373b5b354b8b9;p=kivitendo-erp.git diff --git a/SL/Common.pm b/SL/Common.pm index e7bed372b..c0bca0195 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -336,7 +336,7 @@ sub webdav_folder { my ($form) = @_; return $main::lxdebug->leave_sub() - unless ($main::webdav && $form->{id}); + unless ($::lx_office_conf{features}->{webdav} && $form->{id}); my ($path, $number); @@ -372,9 +372,8 @@ sub webdav_folder { mkdir_with_parents($path); } else { - my $base_path = substr($ENV{'SCRIPT_NAME'}, 1); + my $base_path = $ENV{'SCRIPT_NAME'}; $base_path =~ s|[^/]+$||; - $base_path =~ s|/$||; # wo kommt der wert für dir her? es wird doch gar nichts übergeben? fix für strict my $dir jb 21.2. if (opendir my $dir, $path) { foreach my $file (sort { lc $a cmp lc $b } readdir $dir) { @@ -390,7 +389,7 @@ sub webdav_folder { push @{ $form->{WEBDAV} }, { 'name' => $fname, - 'link' => "$base_path/$file", + 'link' => $base_path . $file, 'type' => $is_directory ? $main::locale->text('Directory') : $main::locale->text('File'), }; }