mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 02:10:56 -05:00
fix shared mount roots not being returned from getSharesInFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
df576c66fa
commit
ef5b60e4cb
1 changed files with 14 additions and 1 deletions
|
|
@ -666,8 +666,21 @@ class DefaultShareProvider implements IShareProvider {
|
|||
);
|
||||
}
|
||||
|
||||
// todo? maybe get these from the oc_mounts table
|
||||
$childMountNodes = array_filter($node->getDirectoryListing(), function (Node $node) {
|
||||
return $node->getInternalPath() === '';
|
||||
});
|
||||
$childMountRootIds = array_map(function (Node $node) {
|
||||
return $node->getId();
|
||||
}, $childMountNodes);
|
||||
|
||||
$qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
|
||||
$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
|
||||
$qb->andWhere(
|
||||
$qb->expr()->orX(
|
||||
$qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())),
|
||||
$qb->expr()->in('f.fileid', $qb->createNamedParameter($childMountRootIds, IQueryBuilder::PARAM_INT_ARRAY))
|
||||
)
|
||||
);
|
||||
|
||||
$qb->orderBy('id');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue