Webdav-Datei-Aufruf direkt mit Backend-Funktion
authorJan Büren <jan@kivitendo-premium.de>
Fri, 23 Dec 2016 11:04:38 +0000 (12:04 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Fri, 23 Dec 2016 11:04:38 +0000 (12:04 +0100)
Webdav Pfad und Dateiname muss nicht bei der Parameterübergabe
zusammengebaut werden. Besser direkt die Funktion Webdav->full_filedescriptor
hierfür nutzen

SL/Controller/Letter.pm
SL/Controller/Order.pm
bin/mozilla/ap.pl
bin/mozilla/gl.pl

index 25c11f7..cfc1f68 100644 (file)
@@ -616,7 +616,7 @@ sub init_webdav_objects {
   return [ map {
     +{ name => $_->filename,
        type => t8('File'),
-       link => File::Spec->catdir($webdav_path, $_->filename),
+       link => File::Spec->catfile($_->full_filedescriptor),
      }
   } @all_objects ];
 }
index 5c0102b..82b8a2a 100644 (file)
@@ -1081,7 +1081,7 @@ sub _pre_render {
     my @all_objects = $webdav->get_all_objects;
     @{ $self->{template_args}->{WEBDAV} } = map { { name => $_->filename,
                                                     type => t8('File'),
-                                                    link => File::Spec->catdir($webdav_path, $_->filename),
+                                                    link => File::Spec->catfile($_->full_filedescriptor),
                                                 } } @all_objects;
   }
 
index 0af3450..4ceb128 100644 (file)
@@ -137,7 +137,7 @@ sub display_form {
     my @all_objects = $webdav->get_all_objects;
     @{ $form->{WEBDAV} } = map { { name => $_->filename,
                                    type => t8('File'),
-                                   link => File::Spec->catdir($webdav_path, $_->filename),
+                                   link => File::Spec->catfile($_->full_filedescriptor),
                                } } @all_objects;
   }
   &form_header;
index 2c5f74a..7237a59 100644 (file)
@@ -211,7 +211,7 @@ sub edit {
     my @all_objects = $webdav->get_all_objects;
     @{ $form->{WEBDAV} } = map { { name => $_->filename,
                                    type => t8('File'),
-                                   link => File::Spec->catdir($webdav_path, $_->filename),
+                                   link => File::Spec->catfile($_->full_filedescriptor),
                                } } @all_objects;
   }
   form_header();