diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index 71b5ab7f8c8d..076df3c46f62 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -23,7 +23,6 @@ use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\RedirectResponse; -use OCP\AppFramework\IApi; use OC\URLGenerator; use OC\AppConfig; use OCP\ILogger; @@ -159,7 +158,6 @@ public function showShare($token, $path = '') { $originalSharePath .= $path; } - $dir = dirname($originalSharePath); $file = basename($originalSharePath); $shareTmpl = array(); @@ -171,7 +169,7 @@ public function showShare($token, $path = '') { $shareTmpl['sharingToken'] = $token; $shareTmpl['server2serversharing'] = Helper::isOutgoingServer2serverShareEnabled(); $shareTmpl['protected'] = isset($linkItem['share_with']) ? 'true' : 'false'; - $shareTmpl['dir'] = $dir; + $shareTmpl['dir'] = ''; $shareTmpl['fileSize'] = \OCP\Util::humanFileSize(\OC\Files\Filesystem::filesize($originalSharePath)); // Show file list diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index d9b8f0f4f303..d9d14f67c336 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -12,6 +12,6 @@ $urlGenerator = new \OC\URLGenerator(\OC::$server->getConfig()); $token = isset($_GET['t']) ? $_GET['t'] : ''; -$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadshare' : 'files_sharing.sharecontroller.showshare'; +$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token))); diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php index 8dcb24755640..f13e5b2e4974 100644 --- a/apps/files_sharing/tests/controller/sharecontroller.php +++ b/apps/files_sharing/tests/controller/sharecontroller.php @@ -153,7 +153,7 @@ public function testShowShare() { 'sharingToken' => $this->token, 'server2serversharing' => true, 'protected' => 'true', - 'dir' => '/', + 'dir' => '', 'downloadURL' => null, 'fileSize' => '33 B' );