diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-08 17:08:52 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-08 17:08:52 +0200 |
| commit | a1fda2758e9c241ac3eb980ac8716dfedbe9dd3c (patch) | |
| tree | 2190f0478fb153efdb8ba48ebb574c7691f4f351 /lib/models/Degree.class.php | |
| parent | 244d00ed91ad2b4b83e902a45cd6def3d7bc7e86 (diff) | |
let phpcsfixer fix errors according to @PSR12 rules on lib/modelsphpcsfixer
Diffstat (limited to 'lib/models/Degree.class.php')
| -rw-r--r-- | lib/models/Degree.class.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/models/Degree.class.php b/lib/models/Degree.class.php index c5b83c5..4908992 100644 --- a/lib/models/Degree.class.php +++ b/lib/models/Degree.class.php @@ -44,9 +44,11 @@ class Degree extends SimpleORMap $sql = 'SELECT COUNT(DISTINCT `user_id`) FROM `user_studiengang`'; $parameters = [':degree_id' => $this->id]; if (!$GLOBALS['perm']->have_perm('root')) { - $inst_ids = SimpleCollection::createFromArray(Institute::findBySQL('Institut_id IN (SELECT institut_id FROM roles_user WHERE userid = :user_id) + $inst_ids = SimpleCollection::createFromArray(Institute::findBySQL( + 'Institut_id IN (SELECT institut_id FROM roles_user WHERE userid = :user_id) OR fakultaets_id IN (SELECT institut_id FROM roles_user WHERE userid = :user_id)', - [':user_id' => $GLOBALS['user']->user_id]))->pluck('institut_id'); + [':user_id' => $GLOBALS['user']->user_id] + ))->pluck('institut_id'); $sql .= 'JOIN `mvv_fach_inst` as `fach_inst` ON (`user_studiengang`.`fach_id` = `fach_inst`.`fach_id`) WHERE `user_studiengang`.`abschluss_id` = :degree_id AND `fach_inst`.`institut_id` IN (:inst_ids)'; |
