summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-01 12:15:14 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-01 12:16:05 +0100
commitfc4d0a86efef1af4d7ea17547e259cfdd16e82b4 (patch)
tree7a493b8df05af9b2f0ceb4b83b1316a38330029a /apps/dav/lib
parentce7eb02685940c3d8490965cfc150a591fd92762 (diff)
downloadnextcloud-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.php5
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) {