]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #1234 from owncloud/fix-issue-192
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 4 Feb 2013 19:52:20 +0000 (11:52 -0800)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 4 Feb 2013 19:52:20 +0000 (11:52 -0800)
Fix sharing issue with collection and children mismatches

1  2 
lib/public/share.php

index 3c5c2d53782ac793db96ca92cbcf169a2233b3f5,920ce26700ab919c298cf47ac56402fc7f3c18c5..7d806fafd04281efca47ced855f2b6637204563f
@@@ -516,10 -681,12 +516,11 @@@ class Share 
                                $collectionTypes[] = $type;
                        }
                }
-               if (!self::getBackend($itemType) instanceof Share_Backend_Collection) {
+               // TODO Add option for collections to be collection of themselves, only 'folder' does it now...
+               if (!self::getBackend($itemType) instanceof Share_Backend_Collection || $itemType != 'folder') {
                        unset($collectionTypes[0]);
                }
 -              // Return array if collections were found or the item type is a collection itself
 -              // - collections can be inside collections
 +              // Return array if collections were found or the item type is a collection itself - collections can be inside collections
                if (count($collectionTypes) > 0) {
                        return $collectionTypes;
                }