diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-23 10:50:44 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-20 08:53:37 +0200 |
commit | 366981fba6d01167c1ac38f559bd611062d8e534 (patch) | |
tree | 0025a9def17d24615e4cfa6f512870aa6d6b59fb /lib | |
parent | 53a1b9a84e452bebfc701c93f32f44aefea87a2f (diff) | |
download | nextcloud-server-366981fba6d01167c1ac38f559bd611062d8e534.tar.gz nextcloud-server-366981fba6d01167c1ac38f559bd611062d8e534.zip |
Move public preview endpoint over
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php | 3 | ||||
-rw-r--r-- | lib/private/legacy/template/functions.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php index 2b3f384fcd4..38267779e65 100644 --- a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php +++ b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php @@ -80,6 +80,7 @@ class PublicShareMiddleware extends Middleware { } private function getFunctionForRoute(string $route): string { - return array_pop(explode('.', $route)); + $tmp = explode('.', $route); + return array_pop($tmp); } } diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index 290ffe120a3..55d3a595689 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -262,7 +262,7 @@ function preview_icon( $path ) { * @return string */ function publicPreview_icon ( $path, $token ) { - return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]); + return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 'token' => $token]); } /** |