diff --git a/application/controllers/api/v1/codex/Bundesland.php b/application/controllers/api/v1/codex/Bundesland.php index 023871501..35eaed66f 100644 --- a/application/controllers/api/v1/codex/Bundesland.php +++ b/application/controllers/api/v1/codex/Bundesland.php @@ -30,7 +30,7 @@ class Bundesland extends APIv1_Controller public function getAll() { - $result = $this->BundeslandModel->loadWhole(); + $result = $this->BundeslandModel->load(); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php index 196772958..8a9996e67 100644 --- a/application/controllers/api/v1/codex/Nation.php +++ b/application/controllers/api/v1/codex/Nation.php @@ -63,7 +63,7 @@ class Nation extends APIv1_Controller } else { - $result = $this->NationModel->loadWhole(); + $result = $this->NationModel->load(); } } diff --git a/application/controllers/api/v1/codex/Orgform.php b/application/controllers/api/v1/codex/Orgform.php index 6fa6ccf65..e2e1c870d 100644 --- a/application/controllers/api/v1/codex/Orgform.php +++ b/application/controllers/api/v1/codex/Orgform.php @@ -52,7 +52,7 @@ class Orgform extends APIv1_Controller */ public function getAll() { - $result = $this->OrgformModel->loadWhole(); + $result = $this->OrgformModel->load(); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Statistik.php b/application/controllers/api/v1/organisation/Statistik.php index beeaaae22..c89bdb3fc 100644 --- a/application/controllers/api/v1/organisation/Statistik.php +++ b/application/controllers/api/v1/organisation/Statistik.php @@ -54,7 +54,7 @@ class Statistik extends APIv1_Controller { $this->StatistikModel->addOrder($this->get('order')); - $result = $this->StatistikModel->loadWhole(); + $result = $this->StatistikModel->load(); $this->response($result, REST_Controller::HTTP_OK); } @@ -68,7 +68,7 @@ class Statistik extends APIv1_Controller $this->StatistikModel->addOrder('bezeichnung'); $this->StatistikModel->addOrder('statistik_kurzbz'); - $result = $this->StatistikModel->loadWhole(); + $result = $this->StatistikModel->load(); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Studiensemester.php b/application/controllers/api/v1/organisation/Studiensemester.php index 6c97f5050..46c5e6d7d 100644 --- a/application/controllers/api/v1/organisation/Studiensemester.php +++ b/application/controllers/api/v1/organisation/Studiensemester.php @@ -89,7 +89,7 @@ class Studiensemester extends APIv1_Controller $this->StudiensemesterModel->addOrder('ende', 'ASC'); } - $result = $this->StudiensemesterModel->loadWhole(); + $result = $this->StudiensemesterModel->load(); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/ressource/Ort.php b/application/controllers/api/v1/ressource/Ort.php index 020b06040..13b8989fd 100644 --- a/application/controllers/api/v1/ressource/Ort.php +++ b/application/controllers/api/v1/ressource/Ort.php @@ -66,7 +66,7 @@ class Ort extends APIv1_Controller } else { - $result = $this->OrtModel->loadWhole(); + $result = $this->OrtModel->load(); } $this->response($result, REST_Controller::HTTP_OK); diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index a5bc4d298..e0cd6631c 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -186,36 +186,6 @@ class DB_Model extends FHC_Model else return $this->_error($this->db->error(), FHC_DB_ERROR); } - - - - /** --------------------------------------------------------------- - * Load single data from DB-Table - * - * @param string $id ID (Primary Key) for SELECT ... WHERE - * @return array - */ - public function loadWhole() - { - // Check Class-Attributes - if (is_null($this->dbTable)) - return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR); - if (is_null($this->pk)) - return $this->_error(lang('fhc_'.FHC_NOPK), FHC_MODEL_ERROR); - - - // Check rights - if (! $this->fhc_db_acl->isBerechtigt($this->acl[$this->dbTable], 's')) - return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl[$this->dbTable], FHC_MODEL_ERROR); - - // DB-SELECT - $result = $this->db->get($this->dbTable); - - if ($result) - return $this->_success($result->result()); - else - return $this->_error($this->db->error(), FHC_DB_ERROR); - } /** --------------------------------------------------------------- * Add a table to join with diff --git a/application/widgets/sprache_widget.php b/application/widgets/sprache_widget.php index 325efaab7..87e3324ac 100644 --- a/application/widgets/sprache_widget.php +++ b/application/widgets/sprache_widget.php @@ -8,7 +8,7 @@ class sprache_widget extends Widget public function display($data) { $this->load->model('system/Sprache_model'); - $res = $this->Sprache_model->loadWhole(); + $res = $this->Sprache_model->load(); //var_dump($res); foreach ($res->retval as $obj) { diff --git a/include/benutzer.class.php b/include/benutzer.class.php index edebb247c..7bbc740a6 100644 --- a/include/benutzer.class.php +++ b/include/benutzer.class.php @@ -49,7 +49,7 @@ class benutzer extends person * Laedt Benutzer mit der uebergebenen ID * @param $uid ID der Person die geladen werden soll */ - public function load($uid) + public function load($uid = null) { $qry = "SELECT * FROM public.tbl_benutzer WHERE uid=".$this->db_add_param($uid); diff --git a/include/berechtigung.class.php b/include/berechtigung.class.php index 3e9cc654c..50a1c05e3 100644 --- a/include/berechtigung.class.php +++ b/include/berechtigung.class.php @@ -50,7 +50,7 @@ class berechtigung extends Berechtigung_model * @param $berechtigung_kurzbz * @return true wenn ok, false im Fehlerfall */ - public function load($berechtigung_kurzbz) + public function load($berechtigung_kurzbz = null) { $result = parent::load($berechtigung_kurzbz); diff --git a/include/dms.class.php b/include/dms.class.php index 55ed1d02f..07ceee6bd 100644 --- a/include/dms.class.php +++ b/include/dms.class.php @@ -71,7 +71,7 @@ class dms extends Dms_model * @param dms_id * @param version optional */ - public function load($dms_id, $version=null) + public function load($dms_id = null, $version=null) { $qry = "SELECT tbl_dms.dms_id, * FROM campus.tbl_dms JOIN campus.tbl_dms_version USING(dms_id) WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER); diff --git a/include/funktion.class.php b/include/funktion.class.php index 838638079..faf3daeee 100644 --- a/include/funktion.class.php +++ b/include/funktion.class.php @@ -109,7 +109,7 @@ class funktion extends Funktion_model * @param $funktion_kurzbz ID der zu ladenden Funktion * @return true wenn ok, false im Fehlerfall */ - public function load($funktion_kurzbz) + public function load($funktion_kurzbz = null) { if ($funktion_kurzbz == '') { diff --git a/include/kontakt.class.php b/include/kontakt.class.php index 88c3a6db9..416e93ef7 100644 --- a/include/kontakt.class.php +++ b/include/kontakt.class.php @@ -80,7 +80,7 @@ class kontakt extends Kontakt_model * @param $kontakt_id ID des zu ladenden Kontaktes * @return true wenn ok, false im Fehlerfall */ - public function load($kontakt_id) + public function load($kontakt_id = null) { if(!is_numeric($kontakt_id)) { diff --git a/include/mitarbeiter.class.php b/include/mitarbeiter.class.php index 91e3d8b70..7c701d61f 100644 --- a/include/mitarbeiter.class.php +++ b/include/mitarbeiter.class.php @@ -67,7 +67,7 @@ class mitarbeiter extends benutzer * @param $uid * @return true wenn ok, sonst false */ - public function load($uid) + public function load($uid = null) { if(!benutzer::load($uid)) return false; diff --git a/include/nation.class.php b/include/nation.class.php index 230943da2..964b45d73 100644 --- a/include/nation.class.php +++ b/include/nation.class.php @@ -67,7 +67,7 @@ class nation extends Nation_model * @param $code code der zu ladenden Nation * @return true wenn ok, false im Fehlerfall */ - public function load($code) + public function load($code = null) { //Lesen der Daten aus der Datenbank $result = parent::loadWhere(array('nation_code' => $code)); @@ -126,7 +126,7 @@ class nation extends Nation_model } else { - $result = parent::loadWhole(); + $result = parent::load(); } } diff --git a/include/organisationsform.class.php b/include/organisationsform.class.php index cfaf45648..b9a26bbc5 100644 --- a/include/organisationsform.class.php +++ b/include/organisationsform.class.php @@ -54,7 +54,7 @@ class organisationsform extends Orgform_model * Laedt eine Organisationsform * @param $orgform_kurzbz */ - public function load($orgform_kurzbz) + public function load($orgform_kurzbz = null) { $qry = "SELECT * FROM bis.tbl_orgform WHERE orgform_kurzbz=".$this->db_add_param($orgform_kurzbz).';'; diff --git a/include/ort.class.php b/include/ort.class.php index d335c6feb..db6d13dcb 100644 --- a/include/ort.class.php +++ b/include/ort.class.php @@ -93,7 +93,7 @@ class ort extends Ort_model } else { - $result = parent::loadWhole(); + $result = parent::load(); } if (!is_object($result) || (is_object($result) && ($result->error != EXIT_SUCCESS || !is_array($result->retval)))) @@ -136,7 +136,7 @@ class ort extends Ort_model * @param $fachb_id ID des zu ladenden Ortes * @return true wenn ok, false im Fehlerfall */ - public function load($ort_kurzbz) + public function load($ort_kurzbz = null) { if ($ort_kurzbz == '') { diff --git a/include/person.class.php b/include/person.class.php index 79f98f113..5682d2ee7 100644 --- a/include/person.class.php +++ b/include/person.class.php @@ -87,7 +87,7 @@ class person extends Person_model * @param int $personId ID der Person die geladen werden soll. * @return bool **/ - public function load($personId) + public function load($personId = null) { //person_id auf gueltigkeit pruefen if (is_numeric($personId) && $personId != '') diff --git a/include/preinteressent.class.php b/include/preinteressent.class.php index d71f09e8a..f508c5028 100644 --- a/include/preinteressent.class.php +++ b/include/preinteressent.class.php @@ -72,7 +72,7 @@ class preinteressent extends Preinteressent_model * Laedt einen Datensatz * @param preinteressent_id ID des zu ladenden Datensatzes */ - public function load($preinteressent_id) + public function load($preinteressent_id = null) { //id auf Gueltigkeit pruefen if(!is_numeric($preinteressent_id) || $preinteressent_id == '') diff --git a/include/prestudent.class.php b/include/prestudent.class.php index a9964c88a..2af8293b5 100755 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -104,7 +104,7 @@ class prestudent extends Prestudent_model * Laedt Prestudent mit der uebergebenen ID * @param $prestudent_id ID des Prestudenten der geladen werden soll */ - public function load($prestudent_id) + public function load($prestudent_id = null) { if (!is_numeric($prestudent_id)) { diff --git a/include/statistik.class.php b/include/statistik.class.php index 73be1b34d..2fd46c31e 100644 --- a/include/statistik.class.php +++ b/include/statistik.class.php @@ -80,7 +80,7 @@ class statistik extends Statistik_model * Laedt eine Statistik * @param $statistik_kurzbz */ - public function load($statistik_kurzbz) + public function load($statistik_kurzbz = null) { $result = parent::load($statistik_kurzbz); @@ -133,7 +133,7 @@ class statistik extends Statistik_model parent::addOrder($order); } - $result = parent::loadWhole(); + $result = parent::load(); if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval)) { @@ -339,7 +339,7 @@ class statistik extends Statistik_model parent::addOrder('bezeichnung'); parent::addOrder('statistik_kurzbz'); - $result = parent::loadWhole(); + $result = parent::load(); if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval)) { diff --git a/include/student.class.php b/include/student.class.php index 6fcfa2014..7e05cfebd 100644 --- a/include/student.class.php +++ b/include/student.class.php @@ -58,7 +58,7 @@ class student extends benutzer * studiensemester_kurzbz * @return true wenn ok, false im Fehlerfall */ - public function load($uid, $studiensemester_kurzbz=null) + public function load($uid = null, $studiensemester_kurzbz=null) { if(!benutzer::load($uid)) return false; diff --git a/include/studiensemester.class.php b/include/studiensemester.class.php index 12e48ee1b..1ed0b8a1c 100644 --- a/include/studiensemester.class.php +++ b/include/studiensemester.class.php @@ -59,7 +59,7 @@ class studiensemester extends Studiensemester_model * * @param $studiensemester_kurzbz Stsem das geladen werden soll */ - public function load($studiensemester_kurzbz) + public function load($studiensemester_kurzbz = null) { $result = parent::load($studiensemester_kurzbz); @@ -318,7 +318,7 @@ class studiensemester extends Studiensemester_model parent::addOrder('ende', 'ASC'); } - $result = parent::loadWhole(); + $result = parent::load(); if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval)) {