aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-01-08 16:56:56 +0100
committerRobin Appelman <robin@icewind.nl>2024-03-06 15:33:05 +0100
commitbfeb97c54a5de25493ff1fa4fd36ae1aa2acec49 (patch)
tree49191a40b9dc41820ba9e55fe3829c4770f94693 /apps/federatedfilesharing
parentc651e06a6d1296cbca03a706d9cded707e70af74 (diff)
downloadnextcloud-server-bfeb97c54a5de25493ff1fa4fd36ae1aa2acec49.tar.gz
nextcloud-server-bfeb97c54a5de25493ff1fa4fd36ae1aa2acec49.zip
fix: also filter by storage when getting shares in folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php3
1 files changed, 2 insertions, 1 deletions
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()) . '/%')));
}