Skip to content

Commit

Permalink
Merge pull request #5452 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
juliusknorr authored Jan 11, 2024
2 parents 5b4acc6 + 534c71b commit 83348d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Sharing/DeckShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 83348d1

Please sign in to comment.