summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/files.php2
-rw-r--r--lib/public/share.php15
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/public/files.php b/lib/public/files.php
index 90889c59ad8..2d6775e01f1 100644
--- a/lib/public/files.php
+++ b/lib/public/files.php
@@ -98,7 +98,7 @@ class Files {
/**
* @param string appid
* @param $app app
- * @return OC_FilesystemView
+ * @return \OC\Files\View
*/
public static function getStorage( $app ) {
return \OC_App::getStorage( $app );
diff --git a/lib/public/share.php b/lib/public/share.php
index da1c0616390..060f67c9e91 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -285,10 +285,10 @@ class Share {
// If the item is a folder, scan through the folder looking for equivalent item types
if ($itemType == 'folder') {
$parentFolder = self::put('folder', $itemSource, $shareType, $shareWith, $uidOwner, $permissions, true);
- if ($parentFolder && $files = \OC_Files::getDirectoryContent($itemSource)) {
+ if ($parentFolder && $files = \OC\Files\Filesystem::getDirectoryContent($itemSource)) {
for ($i = 0; $i < count($files); $i++) {
$name = substr($files[$i]['name'], strpos($files[$i]['name'], $itemSource) - strlen($itemSource));
- if ($files[$i]['mimetype'] == 'httpd/unix-directory' && $children = \OC_Files::getDirectoryContent($name, '/')) {
+ if ($files[$i]['mimetype'] == 'httpd/unix-directory' && $children = \OC\Files\Filesystem::getDirectoryContent($name, '/')) {
// Continue scanning into child folders
array_push($files, $children);
} else {
@@ -768,9 +768,10 @@ class Share {
if ($row['item_type'] == 'file' || $row['item_type'] == 'folder') {
$childItem['file_source'] = $child['source'];
} else {
- $childItem['file_source'] = \OC_FileCache::getId($child['file_path']);
+ $meta = \OC\Files\Filesystem::getFileInfo($child['file_path']);
+ $childItem['file_source'] = $meta['fileid'];
}
- $childItem['file_target'] = \OC_Filesystem::normalizePath($child['file_path']);
+ $childItem['file_target'] = \OC\Files\Filesystem::normalizePath($child['file_path']);
}
if (isset($item)) {
if ($childItem[$column] == $item) {
@@ -881,7 +882,8 @@ class Share {
if ($itemType == 'file' || $itemType == 'folder') {
$fileSource = $itemSource;
} else {
- $fileSource = \OC_FileCache::getId($filePath);
+ $meta = \OC\Files\Filesystem::getFileInfo($filePath);
+ $fileSource = $meta['fileid'];
}
if ($fileSource == -1) {
$message = 'Sharing '.$itemSource.' failed, because the file could not be found in the file cache';
@@ -1063,7 +1065,8 @@ class Share {
}
if ($item['uid_owner'] == $uidOwner) {
if ($itemType == 'file' || $itemType == 'folder') {
- if ($item['file_source'] == \OC_FileCache::getId($itemSource)) {
+ $meta = \OC\Files\Filesystem::getFileInfo($itemSource);
+ if ($item['file_source'] == $meta['fileid']) {
return $target;
}
} else if ($item['item_source'] == $itemSource) {