Skip to content

Commit

Permalink
[TASK] Reset default query settings before creating query for selecte…
Browse files Browse the repository at this point in the history
…d pages
  • Loading branch information
torben-fr committed Aug 30, 2024
1 parent d8f65c3 commit 3c54370
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Classes/Domain/Repository/ProjectRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public function findByFilter(
$query = $this->createQuery();

$constraints = [];

if ($selected && !empty($pages)) {
$query->getQuerySettings()->setRespectStoragePage(false);
$constraints[] = $query->in('uid', $pages);
}

$constraints[] = $query->equals('doktype', Page::TYPE_ACEDEMIC_PROJECT);

if ($filter) {
Expand All @@ -37,9 +43,6 @@ public function findByFilter(
}
}
}
if ($selected && !empty($pages)) {
$constraints[] = $query->in('uid', $pages);
}

if ($hideCompletedProjects) {
$constraints[] = $query->logicalOr(
Expand Down

0 comments on commit 3c54370

Please sign in to comment.