From c3d0f0370484520aceba7890a29751968e34db45 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 15 Jul 2025 13:06:08 +0200 Subject: [PATCH] remove unnecessary addMetas, add table alias to fix Prestudent Filters in StvTree --- .../controllers/api/frontend/v1/stv/Student.php | 2 -- .../controllers/api/frontend/v1/stv/Students.php | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php index d56736541..6287ecbda 100644 --- a/application/controllers/api/frontend/v1/stv/Student.php +++ b/application/controllers/api/frontend/v1/stv/Student.php @@ -243,11 +243,9 @@ class Student extends FHCAPI_Controller } $array_allowed_props_student = ['matrikelnr']; - $this->addMeta('bhtest1', $this->isLaufendesSemester($studiensemester_kurzbz)); if($this->isLaufendesSemester($studiensemester_kurzbz)) { $array_allowed_props_student = ['matrikelnr', 'verband', 'semester', 'gruppe']; - $this->addMeta('bhtest2', $array_allowed_props_student); } $update_student = array(); foreach ($array_allowed_props_student as $prop) { diff --git a/application/controllers/api/frontend/v1/stv/Students.php b/application/controllers/api/frontend/v1/stv/Students.php index 41c5fc613..f9ceabc3d 100644 --- a/application/controllers/api/frontend/v1/stv/Students.php +++ b/application/controllers/api/frontend/v1/stv/Students.php @@ -223,25 +223,25 @@ class Students extends FHCAPI_Controller break; case "bewerbungnichtabgeschickt": $where['ps.status_kurzbz'] = 'Interessent'; - $where['bewerbung_abgeschicktamum'] = null; + $where['ps.bewerbung_abgeschicktamum'] = null; break; case "bewerbungabgeschickt": $where['ps.status_kurzbz'] = 'Interessent'; - $where['bewerbung_abgeschicktamum IS NOT NULL'] = null; - $where['bestaetigtam'] = null; + $where['ps.bewerbung_abgeschicktamum IS NOT NULL'] = null; + $where['ps.bestaetigtam'] = null; break; case "statusbestaetigt": $where['ps.status_kurzbz'] = 'Interessent'; - $where['bestaetigtam IS NOT NULL'] = null; + $where['ps.bestaetigtam IS NOT NULL'] = null; break; case "statusbestaetigtrtnichtangemeldet": $where['ps.status_kurzbz'] = 'Interessent'; - $where['bestaetigtam IS NOT NULL'] = null; + $where['ps.bestaetigtam IS NOT NULL'] = null; $this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false); break; case "statusbestaetigtrtangemeldet": $where['ps.status_kurzbz'] = 'Interessent'; - $where['bestaetigtam IS NOT NULL'] = null; + $where['ps.bestaetigtam IS NOT NULL'] = null; $this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false); break; case "zgv":