From 56df48b40f0eb69dff014ef1cc43a2ef9c095506 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 10 Feb 2013 19:14:20 -0500 Subject: [PATCH] Remove additional old compatibility code --- apps/files_sharing/public.php | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 47e074edb8..dfaf4c00a6 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -33,40 +33,7 @@ if (isset($_GET['t'])) { $path = \OC\Files\Filesystem::getPath($linkItem['file_source']); } } -} else { - if (isset($_GET['file']) || isset($_GET['dir'])) { - OCP\Util::writeLog('share', 'Missing token, trying fallback file/dir links', \OCP\Util::DEBUG); - if (isset($_GET['dir'])) { - $type = 'folder'; - $path = $_GET['dir']; - if (strlen($path) > 1 and substr($path, -1, 1) === '/') { - $path = substr($path, 0, -1); - } - $baseDir = $path; - $dir = $baseDir; - } else { - $type = 'file'; - $path = $_GET['file']; - if (strlen($path) > 1 and substr($path, -1, 1) === '/') { - $path = substr($path, 0, -1); - } - } - $shareOwner = substr($path, 1, strpos($path, '/', 1) - 1); - - if (OCP\User::userExists($shareOwner)) { - OC_Util::setupFS($shareOwner); - $fileSource = getId($path); - if ($fileSource != -1) { - $linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $shareOwner); - $pathAndUser['path'] = $path; - $path_parts = explode('/', $path, 5); - $pathAndUser['user'] = $path_parts[1]; - $fileOwner = $path_parts[1]; - } - } - } -} - +} if (isset($path)) { if (!isset($linkItem['item_type'])) { OCP\Util::writeLog('share', 'No item type set for share id: ' . $linkItem['id'], \OCP\Util::ERROR);