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 Berechtigung extends APIv1_Controller
*/
public function getBerechtigung()
{
$berechtigungID = $this->get('berechtigung_id');
$berechtigung_kurzbz = $this->get('berechtigung_kurzbz');
if(isset($berechtigungID))
if(isset($berechtigung_kurzbz))
{
$result = $this->BerechtigungModel->load($berechtigungID);
$result = $this->BerechtigungModel->load($berechtigung_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Berechtigung extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['berechtigung_id']))
if(isset($this->post()['berechtigung_kurzbz']))
{
$result = $this->BerechtigungModel->update($this->post()['berechtigung_id'], $this->post());
$result = $this->BerechtigungModel->update($this->post()['berechtigung_kurzbz'], $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Rolle extends APIv1_Controller
*/
public function getRolle()
{
$rolleID = $this->get('rolle_id');
$rolle_kurzbz = $this->get('rolle_kurzbz');
if(isset($rolleID))
if(isset($rolle_kurzbz))
{
$result = $this->RolleModel->load($rolleID);
$result = $this->RolleModel->load($rolle_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Rolle extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['rolle_id']))
if(isset($this->post()['rolle_kurzbz']))
{
$result = $this->RolleModel->update($this->post()['rolle_id'], $this->post());
$result = $this->RolleModel->update($this->post()['rolle_kurzbz'], $this->post());
}
else
{
@@ -55,9 +55,9 @@ class Rolleberechtigung extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['rolleberechtigung_id']))
if(isset($this->post()['rolle_kurzbz']) && isset($this->post()['berechtigung_kurzbz']))
{
$result = $this->RolleberechtigungModel->update($this->post()['rolleberechtigung_id'], $this->post());
$result = $this->RolleberechtigungModel->update(array($this->post()['rolle_kurzbz'], $this->post()['berechtigung_kurzbz']), $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Tag extends APIv1_Controller
*/
public function getTag()
{
$tagID = $this->get('tag_id');
$tag = $this->get('tag');
if(isset($tagID))
if(isset($tag))
{
$result = $this->TagModel->load($tagID);
$result = $this->TagModel->load($tag);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Tag extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['tag_id']))
if(isset($this->post()['tag']))
{
$result = $this->TagModel->update($this->post()['tag_id'], $this->post());
$result = $this->TagModel->update($this->post()['tag'], $this->post());
}
else
{
@@ -55,9 +55,9 @@ class Variable extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['variable_id']))
if(isset($this->post()['uid']) && isset($this->post()['name']))
{
$result = $this->VariableModel->update($this->post()['variable_id'], $this->post());
$result = $this->VariableModel->update(array($this->post()['uid'], $this->post()['name']), $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Vorlage extends APIv1_Controller
*/
public function getVorlage()
{
$vorlageID = $this->get('vorlage_id');
$vorlage_kurzbz = $this->get('vorlage_kurzbz');
if(isset($vorlageID))
if(isset($vorlage_kurzbz))
{
$result = $this->VorlageModel->load($vorlageID);
$result = $this->VorlageModel->load($vorlage_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Vorlage extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['vorlage_id']))
if(isset($this->post()['vorlage_kurzbz']))
{
$result = $this->VorlageModel->update($this->post()['vorlage_id'], $this->post());
$result = $this->VorlageModel->update($this->post()['vorlage_kurzbz'], $this->post());
}
else
{
@@ -33,11 +33,11 @@ class Webservicetyp extends APIv1_Controller
*/
public function getWebservicetyp()
{
$webservicetypID = $this->get('webservicetyp_id');
$webservicetyp_kurzbz = $this->get('webservicetyp_kurzbz');
if(isset($webservicetypID))
if(isset($webservicetyp_kurzbz))
{
$result = $this->WebservicetypModel->load($webservicetypID);
$result = $this->WebservicetypModel->load($webservicetyp_kurzbz);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Webservicetyp extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['webservicetyp_id']))
if(isset($this->post()['webservicetyp_kurzbz']))
{
$result = $this->WebservicetypModel->update($this->post()['webservicetyp_id'], $this->post());
$result = $this->WebservicetypModel->update($this->post()['webservicetyp_kurzbz'], $this->post());
}
else
{