Skip to content

Commit

Permalink
fix(TreeMapper#findChildren): Don't mix up type of children vs type o…
Browse files Browse the repository at this point in the history
…f folder

see #2257

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Jan 12, 2025
1 parent 0fd1095 commit 960737e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Db/TreeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ protected function getFindSoftDeletedChildrenQuery(string $type): IQueryBuilder
* @psalm-template E as (T is TreeMapper::TYPE_FOLDER ? Folder : (T is TreeMapper::TYPE_BOOKMARK ? Bookmark : SharedFolder))
*/
public function findChildren(string $type, int $folderId, ?bool $softDeleted = null): array {
$listSoftDeleted = $softDeleted ?? $this->isEntrySoftDeleted($type, $folderId);
$listSoftDeleted = $softDeleted ?? $this->isEntrySoftDeleted(self::TYPE_FOLDER, $folderId);
$qb = $this->selectFromType($type, [], !$listSoftDeleted ? $this->getChildrenQuery[$type] : $this->getSoftDeletedChildrenQuery[$type]);
$qb->setParameter('parent_folder', $folderId);
return $this->findEntitiesWithType($qb, $type);
Expand Down

0 comments on commit 960737e

Please sign in to comment.