mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-11 00:59:34 +00:00
d8cd786079
- application/libraries/* -> CS compliant - FHC_Model isEntitled method now return error() or success() - Updated all code that uses isEntitled method from FHC_Model - Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset - Removed depracated method replace from DB_Model - Removed unused method pgArrayPhp from DB_Model - Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private - Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
36 lines
854 B
PHP
36 lines
854 B
PHP
<?php
|
|
|
|
class Vorlagedokument_model extends DB_Model
|
|
{
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->dbTable = 'public.tbl_vorlagedokument';
|
|
$this->pk = 'vorlagedokument_id';
|
|
}
|
|
|
|
/**
|
|
* loadDokumenteFromVorlagestudiengang
|
|
*/
|
|
public function loadDokumenteFromVorlagestudiengang($vorlagestudiengang_id)
|
|
{
|
|
// Checks rights
|
|
if (isError($ent = $this->isEntitled($this->dbTable, PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR))) return $ent;
|
|
|
|
$qry = 'SELECT vorlagedokument_id,
|
|
sort,
|
|
vorlagestudiengang_id,
|
|
dokument_kurzbz,
|
|
bezeichnung
|
|
FROM public.tbl_vorlagedokument
|
|
JOIN public.tbl_dokument USING(dokument_kurzbz)
|
|
WHERE vorlagestudiengang_id = ?
|
|
ORDER BY sort ASC';
|
|
|
|
return $this->execQuery($qry, array($vorlagestudiengang_id));
|
|
}
|
|
}
|