diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-01 12:15:14 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-01 12:16:05 +0100 |
commit | fc4d0a86efef1af4d7ea17547e259cfdd16e82b4 (patch) | |
tree | 7a493b8df05af9b2f0ceb4b83b1316a38330029a /apps/dav/lib | |
parent | ce7eb02685940c3d8490965cfc150a591fd92762 (diff) | |
download | nextcloud-server-fc4d0a86efef1af4d7ea17547e259cfdd16e82b4.tar.gz nextcloud-server-fc4d0a86efef1af4d7ea17547e259cfdd16e82b4.zip |
Fix merging backend results
* Merge share types correctly
* Filter share types
* Order share types
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/SharesPlugin.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index ebb7fefff33..56d76e66184 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -148,9 +148,12 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { $values = array_map(function (\OCP\Files\Node $node) use ($shares) { /** @var IShare[] $shares */ $shares = (isset($shares[$node->getId()])) ? $shares[$node->getId()] : []; - return array_map(function(IShare $share) { + $types = array_map(function(IShare $share) { return $share->getShareType(); }, $shares); + $types = array_unique($types); + sort($types); + return $types; }, $children); $keys = array_map(function (\OCP\Files\Node $node) { |