mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
Fixed controllers parameters names and number
This commit is contained in:
@@ -55,9 +55,9 @@ class Contentgruppe extends APIv1_Controller
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['contentgruppe_id']))
|
||||
if(isset($this->post()['gruppe_kurzbz']) && isset($this->post()['content_id']))
|
||||
{
|
||||
$result = $this->ContentgruppeModel->update($this->post()['contentgruppe_id'], $this->post());
|
||||
$result = $this->ContentgruppeModel->update(array($this->post()['gruppe_kurzbz'], $this->post()['content_id']), $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -66,4 +66,33 @@ class Dms extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function postDms()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['contentsprache_id']))
|
||||
{
|
||||
$result = $this->ContentspracheModel->update($this->post()['contentsprache_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->ContentspracheModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($dms = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,11 @@ class Template extends APIv1_Controller
|
||||
*/
|
||||
public function getTemplate()
|
||||
{
|
||||
$templateID = $this->get('template_id');
|
||||
$template_kurzbz = $this->get('template_kurzbz');
|
||||
|
||||
if(isset($templateID))
|
||||
if(isset($template_kurzbz))
|
||||
{
|
||||
$result = $this->TemplateModel->load($templateID);
|
||||
$result = $this->TemplateModel->load($template_kurzbz);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -54,9 +54,9 @@ class Template extends APIv1_Controller
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['template_id']))
|
||||
if(isset($this->post()['template_kurzbz']))
|
||||
{
|
||||
$result = $this->TemplateModel->update($this->post()['template_id'], $this->post());
|
||||
$result = $this->TemplateModel->update($this->post()['template_kurzbz'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -33,11 +33,11 @@ class Veranstaltungskategorie extends APIv1_Controller
|
||||
*/
|
||||
public function getVeranstaltungskategorie()
|
||||
{
|
||||
$veranstaltungskategorieID = $this->get('veranstaltungskategorie_id');
|
||||
$veranstaltungskategorie_kurzbz = $this->get('veranstaltungskategorie_kurzbz');
|
||||
|
||||
if(isset($veranstaltungskategorieID))
|
||||
if(isset($veranstaltungskategorie_kurzbz))
|
||||
{
|
||||
$result = $this->VeranstaltungskategorieModel->load($veranstaltungskategorieID);
|
||||
$result = $this->VeranstaltungskategorieModel->load($veranstaltungskategorie_kurzbz);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -54,9 +54,9 @@ class Veranstaltungskategorie extends APIv1_Controller
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['veranstaltungskategorie_id']))
|
||||
if(isset($this->post()['veranstaltungskategorie_kurzbz']))
|
||||
{
|
||||
$result = $this->VeranstaltungskategorieModel->update($this->post()['veranstaltungskategorie_id'], $this->post());
|
||||
$result = $this->VeranstaltungskategorieModel->update($this->post()['veranstaltungskategorie_kurzbz'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user