diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-10 19:14:20 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-10 19:14:20 -0500 |
commit | 56df48b40f0eb69dff014ef1cc43a2ef9c095506 (patch) | |
tree | 379de9579146dcfba4e4242237590cf20495fff0 | |
parent | 0d3c58d6b6bb9a3070294de398542b6c453a6190 (diff) | |
download | nextcloud-server-56df48b40f0eb69dff014ef1cc43a2ef9c095506.tar.gz nextcloud-server-56df48b40f0eb69dff014ef1cc43a2ef9c095506.zip |
Remove additional old compatibility code
-rw-r--r-- | apps/files_sharing/public.php | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 47e074edb8c..dfaf4c00a6f 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); |