mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
Sprache bei Templatetext
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user