summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-02-06 13:09:04 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-02-06 13:09:04 -0500
commitcc19df22a1c6e69ebffb23eaf6e07c6361a59aa7 (patch)
tree3201f8e751e5c76783e90601ceebeca8cba8e227 /apps
parent81792448ae849b2d1cc6af561c98e39cb03d9fa3 (diff)
downloadnextcloud-server-cc19df22a1c6e69ebffb23eaf6e07c6361a59aa7.tar.gz
nextcloud-server-cc19df22a1c6e69ebffb23eaf6e07c6361a59aa7.zip
Remove old OC4 link compatibility
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/public.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index a3e0ec192af..7159b21511c 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -2,52 +2,6 @@
// Load other apps for file previews
OC_App::loadApps();
-// Compatibility with shared-by-link items from ownCloud 4.0
-// requires old Sharing table !
-// support will be removed in OC 5.0,a
-if (isset($_GET['token'])) {
- unset($_GET['file']);
- $qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ?', 1);
- $filepath = $qry->execute(array($_GET['token']))->fetchOne();
- if (isset($filepath)) {
- $rootView = new \OC\Files\View('');
- $info = $rootView->getFileInfo($filepath, '');
- if (strtolower($info['mimetype']) == 'httpd/unix-directory') {
- $_GET['dir'] = $filepath;
- } else {
- $_GET['file'] = $filepath;
- }
- \OCP\Util::writeLog('files_sharing', 'You have files that are shared by link originating from ownCloud 4.0.'
- .' Redistribute the new links, because backwards compatibility will be removed in ownCloud 5.',
- \OCP\Util::WARN);
- }
-}
-
-function getID($path) {
- // use the share table from the db to find the item source if the file was reshared because shared files
- //are not stored in the file cache.
- if (substr(\OC\Files\Filesystem::getMountPoint($path), -7, 6) == "Shared") {
- $path_parts = explode('/', $path, 5);
- $user = $path_parts[1];
- $intPath = '/'.$path_parts[4];
- $query = \OC_DB::prepare('SELECT `item_source`'
- .' FROM `*PREFIX*share`'
- .' WHERE `uid_owner` = ?'
- .' AND `file_target` = ? ');
- $result = $query->execute(array($user, $intPath));
- $row = $result->fetchRow();
- $fileSource = $row['item_source'];
- } else {
- $rootView = new \OC\Files\View('');
- $meta = $rootView->getFileInfo($path);
- $fileSource = $meta['fileid'];
- }
-
- return $fileSource;
-}
-
-// Enf of backward compatibility
-
/**
* lookup file path and owner by fetching it from the fscache
* needed because OC_FileCache::getPath($id, $user) already requires the user