]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not update child all child shares on group share update 12834/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 4 Dec 2018 19:55:14 +0000 (20:55 +0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 4 Dec 2018 21:53:35 +0000 (21:53 +0000)
Else we overwrite the whole share for link shares. Basically breaking
them.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Share20/DefaultShareProvider.php

index 9c5d78a59589f9d8f3da45a66f6ee9776294ee99..a8de07e6424ba5a7daf6d6b8354340a0d75d4e90 100644 (file)
@@ -265,6 +265,7 @@ class DefaultShareProvider implements IShareProvider {
                        $qb = $this->dbConn->getQueryBuilder();
                        $qb->update('share')
                                ->where($qb->expr()->eq('parent', $qb->createNamedParameter($share->getId())))
+                               ->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE_USERGROUP)))
                                ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner()))
                                ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy()))
                                ->set('item_source', $qb->createNamedParameter($share->getNode()->getId()))