diff --git a/application/controllers/DBTools.php b/application/controllers/DBTools.php index df218c5fe..1b4f3257a 100644 --- a/application/controllers/DBTools.php +++ b/application/controllers/DBTools.php @@ -458,6 +458,7 @@ class DBTools extends FHC_Controller break; // **** Default **** default: echo ' what? roles or permisssions?'; + exit(); } exit('Succesfully checked!'); diff --git a/application/controllers/system/Templates.php b/application/controllers/system/Templates.php index 796c50c02..aca104d0b 100755 --- a/application/controllers/system/Templates.php +++ b/application/controllers/system/Templates.php @@ -134,6 +134,10 @@ class Templates extends FHC_Controller $data['studiengang_kz'] = $this->input->post('studiengang_kz', TRUE); $data['version'] = $this->input->post('version', TRUE); $data['oe_kurzbz'] = $this->input->post('oe_kurzbz', TRUE); + if ($this->input->post('sprache') == '') + $data['sprache'] = null; + else + $data['sprache'] = $this->input->post('sprache', TRUE); if ($this->input->post('orgform_kurzbz') == '') $data['orgform_kurzbz'] = null; else diff --git a/application/models/organisation/Organisationseinheit_model.php b/application/models/organisation/Organisationseinheit_model.php index 840594af0..0ccf3deef 100644 --- a/application/models/organisation/Organisationseinheit_model.php +++ b/application/models/organisation/Organisationseinheit_model.php @@ -11,25 +11,30 @@ class Organisationseinheit_model extends DB_Model $this->pk = 'oe_kurzbz'; } - public function getRecursiveList() + public function getRecursiveList($typ) { - $qry = "WITH RECURSIVE tree (oe_kurzbz, bezeichnung,path) AS + $qry = "WITH RECURSIVE tree (oe_kurzbz, bezeichnung, path, organisationseinheittyp_kurzbz) AS ( SELECT oe_kurzbz, bezeichnung||' ('||organisationseinheittyp_kurzbz||')' AS bezeichnung, - oe_kurzbz||'|' AS path + oe_kurzbz||'|' AS path, + organisationseinheittyp_kurzbz FROM tbl_organisationseinheit WHERE oe_parent_kurzbz IS NULL AND aktiv UNION ALL SELECT oe.oe_kurzbz, oe.bezeichnung||' ('||oe.organisationseinheittyp_kurzbz||')' AS bezeichnung, - tree.path ||oe.oe_kurzbz||'|' AS path + tree.path ||oe.oe_kurzbz||'|' AS path, + oe.organisationseinheittyp_kurzbz FROM tree JOIN tbl_organisationseinheit oe ON (tree.oe_kurzbz=oe.oe_parent_kurzbz) ) - SELECT oe_kurzbz AS value, substring(regexp_replace(path, '[A-z]+\|', '-','g')||bezeichnung,2) AS name, path FROM tree ORDER BY path;"; + SELECT oe_kurzbz AS value, substring(regexp_replace(path, '[A-z]+\|', '-','g')||bezeichnung,2) AS name, path FROM tree "; + if (!empty($typ)) + $qry .= 'WHERE organisationseinheittyp_kurzbz IN ('.$typ.') '; + $qry .= 'ORDER BY path;'; if ($res = $this->db->query($qry)) diff --git a/application/views/system/templatetextEdit.php b/application/views/system/templatetextEdit.php index e2d339eca..fcf1866fe 100644 --- a/application/views/system/templatetextEdit.php +++ b/application/views/system/templatetextEdit.php @@ -5,12 +5,13 @@