summaryrefslogtreecommitdiffstats
path: root/lib/private/share/share.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-10-13 10:05:49 +0200
committerRoeland Jago Douma <rullzer@owncloud.com>2015-10-13 10:05:49 +0200
commit06aaa059d177e42d6bf674a22588ccc98f91b3e1 (patch)
treeac517bc26236e1fedfeb82ef0e907ec922e69e28 /lib/private/share/share.php
parent1f146d678c115ba9e6894e5ee6f8f5f3978f0dd9 (diff)
downloadnextcloud-server-06aaa059d177e42d6bf674a22588ccc98f91b3e1.tar.gz
nextcloud-server-06aaa059d177e42d6bf674a22588ccc98f91b3e1.zip
Squash collection shares
If folder1 is shared to user2 and user3. And folder1/folder2 is shared to user4 and user5 then getting all the users with access to folder1/folder2 should only list user2 and user 3 once. Previously this was done twice since we request the info two times. This fix makes sure that we only append unique results to the array. * Added test
Diffstat (limited to 'lib/private/share/share.php')
-rw-r--r--lib/private/share/share.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 932586b5c27..aafaeca9768 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1914,6 +1914,7 @@ class Share extends Constants {
}
}
if (!empty($collectionItems)) {
+ $collectionItems = array_unique($collectionItems, SORT_REGULAR);
$items = array_merge($items, $collectionItems);
}