From 359506e56c71e419ac82c2adf0de22cfd6d59cfa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 23 Dec 2016 12:04:38 +0100 Subject: [PATCH] Webdav-Datei-Aufruf direkt mit Backend-Funktion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 2 +- SL/Controller/Order.pm | 2 +- bin/mozilla/ap.pl | 2 +- bin/mozilla/gl.pl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/Controller/Letter.pm b/SL/Controller/Letter.pm index 25c11f780..cfc1f6867 100644 --- a/SL/Controller/Letter.pm +++ b/SL/Controller/Letter.pm @@ -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 ]; } diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 5c0102b39..82b8a2ab0 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -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; } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 0af34509a..4ceb12819 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -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; diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 2c5f74a7e..7237a593c 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -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(); -- 2.20.1