diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-27 12:23:13 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-27 12:23:13 +0200 |
commit | 86be7e88721ada34e7b230a0e5dfb4df546bc38a (patch) | |
tree | b49221326ab526d4290d8ad47b19e06094c006e2 /apps/files_sharing/public.php | |
parent | dea0d20a9ad0270896e57a7459d6276798658d7c (diff) | |
download | nextcloud-server-86be7e88721ada34e7b230a0e5dfb4df546bc38a.tar.gz nextcloud-server-86be7e88721ada34e7b230a0e5dfb4df546bc38a.zip |
remove last uses of depricated OC_Filesystem
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r-- | apps/files_sharing/public.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 143edd23c49..35e7734e2d0 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -24,7 +24,7 @@ if (isset($_GET['token'])) { 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_Filesystem::getMountPoint($path), -7, 6) == "Shared") {
+ if (substr(\OC\Files\Filesystem::getMountPoint($path), -7, 6) == "Shared") {
$path_parts = explode('/', $path, 5);
$user = $path_parts[1];
$intPath = '/'.$path_parts[4];
@@ -33,7 +33,9 @@ function getID($path) { $row = $result->fetchRow();
$fileSource = $row['item_source'];
} else {
- $fileSource = OC_Filecache::getId($path, '');
+ $rootView = new \OC\Files\View('');
+ $meta = $rootView->getFileInfo($path);
+ $fileSource = $meta['fileid'];
}
return $fileSource;
@@ -102,7 +104,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { if (isset($_GET['path'])) {
$path .= $_GET['path'];
$dir .= $_GET['path'];
- if (!OC_Filesystem::file_exists($path)) {
+ if (!\OC\Files\Filesystem::file_exists($path)) {
header('HTTP/1.0 404 Not Found');
$tmpl = new OCP\Template('', '404', 'guest');
$tmpl->printPage();
@@ -130,7 +132,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { $tmpl = new OCP\Template('files_sharing', 'public', 'base');
$tmpl->assign('owner', $uidOwner);
// Show file list
- if (OC_Filesystem::is_dir($path)) {
+ if (\OC\Files\Filesystem::is_dir($path)) {
OCP\Util::addStyle('files', 'files');
OCP\Util::addScript('files', 'files');
OCP\Util::addScript('files', 'filelist');
|