diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-11-24 11:44:43 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-11-24 11:44:43 +0100 |
commit | 8782b2237c257cf7117ccc441f86e1036b1d2bf3 (patch) | |
tree | 66647fccf50ce26e187344d7c6e87a3a67207ab4 /apps/files_sharing | |
parent | e956bd109467c7ef43fb26ab4883af9802b79eb1 (diff) | |
parent | a7ebfe87c9ef16c698c16c4f72eaf3865825c540 (diff) | |
download | nextcloud-server-8782b2237c257cf7117ccc441f86e1036b1d2bf3.tar.gz nextcloud-server-8782b2237c257cf7117ccc441f86e1036b1d2bf3.zip |
Merge pull request #12084 from owncloud/sharing_fix_shared_with_info
sharing: make sure that we only find the shares from a given owner
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/share/folder.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index 2671f5738b7..f86e9624432 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -26,13 +26,14 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share * * @param int $itemSource item source ID * @param string $shareWith with whom should the item be shared + * @param string $owner owner of the item * @return array with shares */ - public function getParents($itemSource, $shareWith = null) { + public function getParents($itemSource, $shareWith = null, $owner = null) { $result = array(); $parent = $this->getParentId($itemSource); while ($parent) { - $shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith); + $shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith, $owner); if ($shares) { foreach ($shares as $share) { $name = substr($share['path'], strrpos($share['path'], '/') + 1); |