From 06aaa059d177e42d6bf674a22588ccc98f91b3e1 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 13 Oct 2015 10:05:49 +0200 Subject: 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 --- lib/private/share/share.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/private/share') 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); } -- cgit v1.2.3