diff options
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)) ); /** |