- Moved old libraries to CI

- Extended Controllers functionalities
- Added controls to ueberbuchung.php, zeitwuensche.php and funktion_det.php
pages to avoid warnings and notices, especially when no data are in DB
- Removed fhcdb_helper.php because it's no more needed
This commit is contained in:
paolo
2016-06-07 17:55:31 +02:00
parent 0dc605df3c
commit 3955d4b395
11 changed files with 176 additions and 544 deletions
@@ -65,6 +65,27 @@ class Prestudent extends APIv1_Controller
$this->response();
}
}
/**
* @return void
*/
public function getLastStatus()
{
$prestudent_id = $this->get('prestudent_id');
$studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
$status_kurzbz = $this->get('status_kurzbz');
if (isset($prestudent_id))
{
$result = $this->PrestudentModel->getLastStatus($prestudent_id, $studiensemester_kurzbz, $status_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
else
{
$this->response();
}
}
/**
* @return void
@@ -46,6 +46,31 @@ class Ort extends APIv1_Controller
$this->response();
}
}
/**
* @return void
*/
public function getAll()
{
$raumtyp_kurzbz = $this->get('raumtyp_kurzbz');
$this->OrtModel->addOrder('ort_kurzbz');
if (!is_null($raumtyp_kurzbz) && $raumtyp_kurzbz != '')
{
$result = $this->OrtModel->addJoin('public.tbl_ortraumtyp', 'ort_kurzbz');
if ($result->error == EXIT_SUCCESS)
{
$result = $this->OrtModel->loadWhere(array('raumtyp_kurzbz' => $raumtyp_kurzbz));
}
}
else
{
$result = $this->OrtModel->loadWhole();
}
$this->response($result, REST_Controller::HTTP_OK);
}
/**
* @return void