From df690cd1f2c3d49d52a0b70fdf04f386718ddb28 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 29 Jan 2016 11:41:28 +0100 Subject: [PATCH] getChildren should not return usergroup shares --- lib/private/share20/defaultshareprovider.php | 12 ++++++------ lib/private/share20/manager.php | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php index 261ba5d4884..ed9c03020b6 100644 --- a/lib/private/share20/defaultshareprovider.php +++ b/lib/private/share20/defaultshareprovider.php @@ -251,6 +251,7 @@ class DefaultShareProvider implements IShareProvider { /** * Get all children of this share + * FIXME: remove once https://github.com/owncloud/core/pull/21660 is in * * @param \OCP\Share\IShare $parent * @return IShare[] @@ -265,12 +266,11 @@ class DefaultShareProvider implements IShareProvider { ->andWhere( $qb->expr()->in( 'share_type', - [ - $qb->expr()->literal(\OCP\Share::SHARE_TYPE_USER), - $qb->expr()->literal(\OCP\Share::SHARE_TYPE_GROUP), - $qb->expr()->literal(\OCP\Share::SHARE_TYPE_LINK), - $qb->expr()->literal(self::SHARE_TYPE_USERGROUP), - ] + $qb->createNamedParameter([ + \OCP\Share::SHARE_TYPE_USER, + \OCP\Share::SHARE_TYPE_GROUP, + \OCP\Share::SHARE_TYPE_LINK, + ], IQueryBuilder::PARAM_INT_ARRAY) ) ) ->orderBy('id'); diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 3c65f67e486..3c5bd197ae8 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -612,6 +612,7 @@ class Manager implements IManager { /** * Delete all the children of this share + * FIXME: remove once https://github.com/owncloud/core/pull/21660 is in * * @param \OCP\Share\IShare $share * @return \OCP\Share\IShare[] List of deleted shares -- 2.39.5