diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-06-13 10:53:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 10:53:26 +0200 |
commit | c46422b780621d5ac700e7ca2f6ddf7b1386482f (patch) | |
tree | b912848eb8190419181b7aa61befc004f9006246 /lib | |
parent | 6a06df824e8527546e5374074efa2c51b1326a29 (diff) | |
parent | f707a40f19b81876b455066106416c64366b1d19 (diff) | |
download | nextcloud-server-c46422b780621d5ac700e7ca2f6ddf7b1386482f.tar.gz nextcloud-server-c46422b780621d5ac700e7ca2f6ddf7b1386482f.zip |
Merge pull request #5343 from nextcloud/share-filter-missing-groups
filter missing groups in share provider
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Group/Manager.php | 2 | ||||
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php index 40009dbfd80..61b47fdd448 100644 --- a/lib/private/Group/Manager.php +++ b/lib/private/Group/Manager.php @@ -74,7 +74,7 @@ class Manager extends PublicEmitter implements IGroupManager { private $cachedGroups = array(); /** - * @var \OC\Group\Group[] + * @var \OC\Group\Group[][] */ private $cachedUserGroups = array(); diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 933a2a5a33e..459a409d3cc 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -743,6 +743,8 @@ class DefaultShareProvider implements IShareProvider { $qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId()))); } + + $groups = array_filter($groups, function($group) { return $group instanceof IGroup; }); $groups = array_map(function(IGroup $group) { return $group->getGID(); }, $groups); $qb->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_GROUP))) |