summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-15 13:31:56 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-15 13:31:56 +0100
commit6824704699a87dbccabe61319610141e7411b90e (patch)
tree5030163c53cbb91f7ea518b4046666148d504291 /apps/files_sharing
parent41106c1967cb7cbee20dd56666d9605eabdc4460 (diff)
parent94200b682cacbbb5fe673fad64ec5bf1d12f34fc (diff)
downloadnextcloud-server-6824704699a87dbccabe61319610141e7411b90e.tar.gz
nextcloud-server-6824704699a87dbccabe61319610141e7411b90e.zip
Merge pull request #21117 from owncloud/owner-file-exists
Only return an owner if the file exists + improved getUidAndFilename
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/helper.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index ca60f622844..cffdc8887ec 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -28,6 +28,7 @@
*/
namespace OCA\Files_Sharing;
+use OC\Files\Filesystem;
use OCP\Files\NotFoundException;
class Helper {
@@ -205,14 +206,7 @@ class Helper {
}
public static function getUidAndFilename($filename) {
- $uid = \OC\Files\Filesystem::getOwner($filename);
- \OC\Files\Filesystem::initMountPoints($uid);
- if ( $uid != \OCP\User::getUser() ) {
- $info = \OC\Files\Filesystem::getFileInfo($filename);
- $ownerView = new \OC\Files\View('/'.$uid.'/files');
- $filename = $ownerView->getPath($info['fileid']);
- }
- return array($uid, $filename);
+ return Filesystem::getView()->getUidAndFilename($filename);
}
/**