From ff390278699fb4c9b2279f8fc8bea0723380e371 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 29 Jul 2022 10:27:25 +0200 Subject: [PATCH] Fix share provider for master changes Signed-off-by: Joas Schilling --- lib/Sharing/DeckShareProvider.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Sharing/DeckShareProvider.php b/lib/Sharing/DeckShareProvider.php index 0745cbbda..6e4bec244 100644 --- a/lib/Sharing/DeckShareProvider.php +++ b/lib/Sharing/DeckShareProvider.php @@ -489,7 +489,7 @@ public function move(IShare $share, $recipient) { * @inheritDoc * @returns */ - public function getSharesInFolder($userId, Folder $node, $reshares) { + public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true) { $qb = $this->dbConnection->getQueryBuilder(); $qb->select('*') ->from('share', 's') @@ -516,7 +516,11 @@ public function getSharesInFolder($userId, Folder $node, $reshares) { } $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); - $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); + if ($shallow) { + $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); + } else { + $qb->andWhere($qb->expr()->like('f.path', $qb->createNamedParameter($this->dbConnection->escapeLikeParameter($node->getInternalPath()) . '/%'))); + } $qb->orderBy('s.id');