From 0916a27ecbca59c7d0e876fce022f57bf77f444a Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 13 Sep 2018 09:55:06 +0200 Subject: [PATCH] - replaced spaces by hyphens in lv group names - updated comment for getBenutzerFunktionen --- application/models/education/Lehrveranstaltung_model.php | 2 +- application/models/person/Benutzerfunktion_model.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index c55ce8e10..e2578b388 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -88,7 +88,7 @@ class Lehrveranstaltung_model extends DB_Model $query = " - SELECT lehrveranstaltung_id, ? || '_' || kuerzel || '_' || lvpostfix AS lvgroupname + SELECT lehrveranstaltung_id, ? || '_' || kuerzel || '_' || replace(lvpostfix, ' ', '-') AS lvgroupname FROM( SELECT DISTINCT ON (kuerzel, lvpostfix) lehrveranstaltung_id, diff --git a/application/models/person/Benutzerfunktion_model.php b/application/models/person/Benutzerfunktion_model.php index 6a15df107..e6f030e7f 100644 --- a/application/models/person/Benutzerfunktion_model.php +++ b/application/models/person/Benutzerfunktion_model.php @@ -25,8 +25,10 @@ class Benutzerfunktion_model extends DB_Model /** * Gets all Benutzer for a given OE and specified Benutzerfunktionen - * @param $oe_kurzbz * @param $funktion_kurzbz string with one benutzerfunktionname or array with one or more + * @param $oe_kurzbz + * @param bool $activeoeonly if true, retrieve only active Organisationseinheiten + * @param bool $activebenonly if true, retrieve only active Benutzer * @return array|null */ public function getBenutzerFunktionen($funktion_kurzbz, $oe_kurzbz = null, $activeoeonly = false, $activebenonly = false) @@ -41,7 +43,7 @@ class Benutzerfunktion_model extends DB_Model if ($activebenonly === true) $query .= " JOIN public.tbl_benutzer USING(uid)"; - $query .= "WHERE (datum_von <= NOW() OR datum_von IS NULL) AND (datum_bis >= NOW() OR datum_bis IS NULL)"; + $query .= " WHERE (datum_von <= NOW() OR datum_von IS NULL) AND (datum_bis >= NOW() OR datum_bis IS NULL)"; if (is_string($funktion_kurzbz)) {