Fixed controllers parameters names and number

This commit is contained in:
paolo
2016-05-19 15:51:15 +02:00
parent 674e832392
commit 32acc8a414
84 changed files with 415 additions and 360 deletions
@@ -33,11 +33,11 @@ class Benutzer extends APIv1_Controller
*/
public function getBenutzer()
{
$benutzerID = $this->get('benutzer_id');
$uid = $this->get('uid');
if(isset($benutzerID))
if(isset($uid))
{
$result = $this->BenutzerModel->load($benutzerID);
$result = $this->BenutzerModel->load($uid);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Benutzer extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['benutzer_id']))
if(isset($this->post()['uid']))
{
$result = $this->BenutzerModel->update($this->post()['benutzer_id'], $this->post());
$result = $this->BenutzerModel->update($this->post()['uid'], $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Fotostatus extends APIv1_Controller
*/
public function getFotostatus()
{
$fotostatusID = $this->get('fotostatus_id');
$fotostatus_kurzbz = $this->get('fotostatus_kurzbz');
if(isset($fotostatusID))
if(isset($fotostatus_kurzbz))
{
$result = $this->FotostatusModel->load($fotostatusID);
$result = $this->FotostatusModel->load($fotostatus_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Fotostatus extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['fotostatus_id']))
if(isset($this->post()['fotostatus_kurzbz']))
{
$result = $this->FotostatusModel->update($this->post()['fotostatus_id'], $this->post());
$result = $this->FotostatusModel->update($this->post()['fotostatus_kurzbz'], $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Freebusytyp extends APIv1_Controller
*/
public function getFreebusytyp()
{
$freebusytypID = $this->get('freebusytyp_id');
$freebusytyp_kurzbz = $this->get('freebusytyp_kurzbz');
if(isset($freebusytypID))
if(isset($freebusytyp_kurzbz))
{
$result = $this->FreebusytypModel->load($freebusytypID);
$result = $this->FreebusytypModel->load($freebusytyp_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Freebusytyp extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['freebusytyp_id']))
if(isset($this->post()['freebusytyp_kurzbz']))
{
$result = $this->FreebusytypModel->update($this->post()['freebusytyp_id'], $this->post());
$result = $this->FreebusytypModel->update($this->post()['freebusytyp_kurzbz'], $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Kontaktmedium extends APIv1_Controller
*/
public function getKontaktmedium()
{
$kontaktmediumID = $this->get('kontaktmedium_id');
$kontaktmedium_kurzbz = $this->get('kontaktmedium_kurzbz');
if(isset($kontaktmediumID))
if(isset($kontaktmedium_kurzbz))
{
$result = $this->KontaktmediumModel->load($kontaktmediumID);
$result = $this->KontaktmediumModel->load($kontaktmedium_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Kontaktmedium extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['kontaktmedium_id']))
if(isset($this->post()['kontaktmedium_kurzbz']))
{
$result = $this->KontaktmediumModel->update($this->post()['kontaktmedium_id'], $this->post());
$result = $this->KontaktmediumModel->update($this->post()['kontaktmedium_kurzbz'], $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Kontakttyp extends APIv1_Controller
*/
public function getKontakttyp()
{
$kontakttypID = $this->get('kontakttyp_id');
$kontakttyp = $this->get('kontakttyp');
if(isset($kontakttypID))
if(isset($kontakttyp))
{
$result = $this->KontakttypModel->load($kontakttypID);
$result = $this->KontakttypModel->load($kontakttyp);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Kontakttyp extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['kontakttyp_id']))
if(isset($this->post()['kontakttyp']))
{
$result = $this->KontakttypModel->update($this->post()['kontakttyp_id'], $this->post());
$result = $this->KontakttypModel->update($this->post()['kontakttyp'], $this->post());
}
else
{