From bfeb97c54a5de25493ff1fa4fd36ae1aa2acec49 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 8 Jan 2024 16:56:56 +0100 Subject: fix: also filter by storage when getting shares in folder Signed-off-by: Robin Appelman --- apps/federatedfilesharing/lib/FederatedShareProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/federatedfilesharing') diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index 45efd0c7c8a..340de3a1761 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -605,8 +605,9 @@ class FederatedShareProvider implements IShareProvider { $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()))); + $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId(), IQueryBuilder::PARAM_INT))); } else { $qb->andWhere($qb->expr()->like('f.path', $qb->createNamedParameter($this->dbConnection->escapeLikeParameter($node->getInternalPath()) . '/%'))); } -- cgit v1.2.3