]> source.dussan.org Git - nextcloud-server.git/commitdiff
getChildren should not return usergroup shares
authorRoeland Jago Douma <rullzer@owncloud.com>
Fri, 29 Jan 2016 10:41:28 +0000 (11:41 +0100)
committerRoeland Jago Douma <rullzer@owncloud.com>
Tue, 2 Feb 2016 09:41:57 +0000 (10:41 +0100)
lib/private/share20/defaultshareprovider.php
lib/private/share20/manager.php

index 261ba5d48847d11cb3e1f5db78794ef949363b4d..ed9c03020b63fcbe9ff1fba5d9163afbc71191db 100644 (file)
@@ -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');
index 3c65f67e486ba81562c0924ac513cd65e94043c0..3c5bd197ae8cb25861b2ba773371e8d1a9e5f432 100644 (file)
@@ -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