The method loadWhole has been removed from model DB_Model.

The same functionality has given by calling the load method without parameters
This commit is contained in:
paolo
2016-06-24 10:39:52 +02:00
parent 3fdf54c1d1
commit 58a6da42ae
23 changed files with 28 additions and 58 deletions
@@ -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);
}
@@ -63,7 +63,7 @@ class Nation extends APIv1_Controller
}
else
{
$result = $this->NationModel->loadWhole();
$result = $this->NationModel->load();
}
}
@@ -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);
}
@@ -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);
}
@@ -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);
}
@@ -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);
-30
View File
@@ -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
+1 -1
View File
@@ -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)
{