Skip to content

Commit

Permalink
Merge pull request #11351 from nextcloud/shares-in-folder-storage
Browse files Browse the repository at this point in the history
also filter by storage when getting shares in folder
  • Loading branch information
nickvergessen authored Jan 18, 2024
2 parents f2ab076 + f2d00d0 commit 22f93e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Share/RoomShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,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 {
Expand Down

0 comments on commit 22f93e4

Please sign in to comment.