mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 01:12:17 +00:00
Merge branch 'feature-29133/einzelne_studiengaenge_aus_issues_check_ausnehmen' into feature_29357/eine_uid_lehre_tbl_abschlusspruefung_studentuid_auf_prestudent_id_aendern
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
class Fehlerkonfiguration_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'system.tbl_fehler_konfiguration';
|
||||
$this->pk = array('konfigurationstyp_kurzbz', 'fehlercode');
|
||||
$this->hasSequence = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all set configuration parameters, optionally filtered by app.
|
||||
* @param string $app
|
||||
* @return object success or error
|
||||
*/
|
||||
public function getKonfiguration($app = null)
|
||||
{
|
||||
$fehlerkonfiguration = array();
|
||||
|
||||
$this->addSelect('fehlercode, konfigurationstyp_kurzbz, konfiguration, fehler_kurzbz');
|
||||
$this->addJoin('system.tbl_fehler_konfigurationstyp konftyp', 'konfigurationstyp_kurzbz');
|
||||
$this->addJoin('system.tbl_fehler fehler', 'fehlercode');
|
||||
$fehlerkonfigurationRes = isset($app) ? $this->loadWhere(array('fehler.app' => $app)) : $this->load();
|
||||
|
||||
if (isError($fehlerkonfigurationRes)) return $fehlerkonfigurationRes;
|
||||
|
||||
if (hasData($fehlerkonfigurationRes))
|
||||
{
|
||||
$fehlerkonfigurationData = getData($fehlerkonfigurationRes);
|
||||
foreach ($fehlerkonfigurationData as $fk)
|
||||
{
|
||||
$konf = json_decode($fk->konfiguration);
|
||||
if (is_array($konf))
|
||||
{
|
||||
$fk->konfiguration = $konf;
|
||||
$fehlerkonfiguration[] = $fk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success($fehlerkonfiguration);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
class Fehlerkonfigurationstyp_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'system.tbl_fehler_konfigurationstyp';
|
||||
$this->pk = array('konfigurationstyp_kurzbz');
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all set configuration parameters, optionally filtered by app.
|
||||
* @param string $app
|
||||
* @return object success or error
|
||||
*/
|
||||
public function getKonfiguration($app = null)
|
||||
{
|
||||
$fehlerkonfiguration = array();
|
||||
|
||||
$this->addSelect('fehlercode, konfigurationstyp_kurzbz, konfiguration, fehler_kurzbz');
|
||||
$this->addJoin('system.tbl_fehler_konfigurationstyp konftyp', 'konfigurationstyp_kurzbz');
|
||||
$this->addJoin('system.tbl_fehler fehler', 'fehlercode');
|
||||
$fehlerkonfigurationRes = isset($app) ? $this->loadWhere(array('fehler.app' => $app)) : $this->load();
|
||||
|
||||
if (isError($fehlerkonfigurationRes)) return $fehlerkonfigurationRes;
|
||||
|
||||
if (hasData($fehlerkonfigurationRes))
|
||||
{
|
||||
$fehlerkonfigurationData = getData($fehlerkonfigurationRes);
|
||||
foreach ($fehlerkonfigurationData as $fk)
|
||||
{
|
||||
$konf = json_decode($fk->konfiguration);
|
||||
if (is_array($konf))
|
||||
{
|
||||
$fk->konfiguration = $konf;
|
||||
$fehlerkonfiguration[] = $fk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success($fehlerkonfiguration);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user