From 534c71b6f8d14ab9981cecb9f44df018a0502326 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 10 Jan 2024 19:15:43 +0100 Subject: [PATCH] also filter by storage when getting shares in folder Signed-off-by: Robin Appelman --- lib/Sharing/DeckShareProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Sharing/DeckShareProvider.php b/lib/Sharing/DeckShareProvider.php index 483e68557..0c2ec3f4f 100644 --- a/lib/Sharing/DeckShareProvider.php +++ b/lib/Sharing/DeckShareProvider.php @@ -516,6 +516,7 @@ public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = t } $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); + $qb->andWhere($qb->expr()->eq('f.storage', $qb->createNamedParameter($node->getMountPoint()->getNumericStorageId(), IQueryBuilder::PARAM_INT))); if ($shallow) { $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); } else {