From 895309b31efb274e8f27b639ac22db5b4e94a6e5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 11 Jun 2013 17:18:22 +0200 Subject: [PATCH] =?utf8?q?WebDAV-Pfad=20f=C3=BCr=20Mandaten=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Common.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/Common.pm b/SL/Common.pm index dc1cc04ec..b58d877c6 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -11,6 +11,7 @@ package Common; use utf8; use strict; +use Carp; use Time::HiRes qw(gettimeofday); use Data::Dumper; @@ -354,6 +355,8 @@ sub webdav_folder { return $main::lxdebug->leave_sub() unless ($::lx_office_conf{features}->{webdav} && $form->{id}); + croak "No client set in \$::auth" unless $::auth->client; + my ($path, $number); $form->{WEBDAV} = []; @@ -382,7 +385,7 @@ sub webdav_folder { $number =~ s|[/\\]|_|g; - $path = "webdav/${path}/${number}"; + $path = "webdav/" . $::auth->client->{id} . "/${path}/${number}"; if (!-d $path) { mkdir_with_parents($path); @@ -390,7 +393,6 @@ sub webdav_folder { } else { my $base_path = $ENV{'SCRIPT_NAME'}; $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) { next if (($file eq '.') || ($file eq '..')); -- 2.20.1