From 346a7ebd0f8f59965233450da770f1f8fac8c2cb Mon Sep 17 00:00:00 2001 From: Thomas Hackl Date: Wed, 9 Jul 2025 15:09:43 +0200 Subject: include current node when searching for courses --- lib/models/StudipStudyArea.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/StudipStudyArea.php b/lib/models/StudipStudyArea.php index 1f532eb..0ba5660 100644 --- a/lib/models/StudipStudyArea.php +++ b/lib/models/StudipStudyArea.php @@ -537,7 +537,7 @@ class StudipStudyArea extends SimpleORMap implements StudipTreeNode if ($with_children) { $query .= " AND t.`sem_tree_id` IN (:ids)"; - $parameters['ids'] = $this->getDescendantIds() ?: ['']; + $parameters['ids'] = array_merge([$this->id], $this->getDescendantIds()); } else { $query .= " AND t.`sem_tree_id` = :id"; $parameters['id'] = $this->id; @@ -566,7 +566,7 @@ class StudipStudyArea extends SimpleORMap implements StudipTreeNode if ($with_children) { $query .= " AND t.`sem_tree_id` IN (:ids)"; - $parameters['ids'] = $this->getDescendantIds() ?: ['']; + $parameters['ids'] = array_merge([$this->id], $this->getDescendantIds()); } else { $query .= " AND t.`sem_tree_id` = :id"; $parameters['id'] = $this->id; -- cgit v1.0