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 | |
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')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/SharesPlugin.php | 5 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/FederatedShareProvider.php | 2 |
2 files changed, 5 insertions, 2 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) { diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index be155ac2daf..270bf86daf7 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -574,7 +574,7 @@ class FederatedShareProvider implements IShareProvider { $qb->expr()->eq('item_type', $qb->createNamedParameter('folder')) )) ->andWhere( - $qb->expr()->eq('shareType', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_REMOTE)) + $qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_REMOTE)) ); /** |