mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
Added permissions array to every controller that extends APIv1_Controller
CheckUserAuth and Test controllers now extends directly the REST_Controller
This commit is contained in:
@@ -21,7 +21,7 @@ class Appdaten extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Appdaten' => 'system/appdaten:rw'));
|
||||
// Load model AppdatenModel
|
||||
$this->load->model('system/Appdaten_model', 'AppdatenModel');
|
||||
}
|
||||
@@ -32,11 +32,11 @@ class Appdaten extends APIv1_Controller
|
||||
public function getAppdaten()
|
||||
{
|
||||
$appdatenID = $this->get('appdaten_id');
|
||||
|
||||
|
||||
if (isset($appdatenID))
|
||||
{
|
||||
$result = $this->AppdatenModel->load($appdatenID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -60,7 +60,7 @@ class Appdaten extends APIv1_Controller
|
||||
{
|
||||
$result = $this->AppdatenModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -68,9 +68,9 @@ class Appdaten extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($appdaten = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Benutzerrolle extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Benutzerrolle' => 'basis/benutzerrolle:rw'));
|
||||
// Load model BenutzerrolleModel
|
||||
$this->load->model('system/benutzerrolle_model', 'BenutzerrolleModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Benutzerrolle extends APIv1_Controller
|
||||
public function getBenutzerrolle()
|
||||
{
|
||||
$benutzerrolleID = $this->get('benutzerrolle_id');
|
||||
|
||||
|
||||
if (isset($benutzerrolleID))
|
||||
{
|
||||
$result = $this->BenutzerrolleModel->load($benutzerrolleID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Benutzerrolle extends APIv1_Controller
|
||||
{
|
||||
$result = $this->BenutzerrolleModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Benutzerrolle extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($benutzerrolle = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Berechtigung extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Berechtigung' => 'basis/berechtigung:rw'));
|
||||
// Load model BerechtigungModel
|
||||
$this->load->model('system/berechtigung_model', 'BerechtigungModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Berechtigung extends APIv1_Controller
|
||||
public function getBerechtigung()
|
||||
{
|
||||
$berechtigung_kurzbz = $this->get('berechtigung_kurzbz');
|
||||
|
||||
|
||||
if (isset($berechtigung_kurzbz))
|
||||
{
|
||||
$result = $this->BerechtigungModel->load($berechtigung_kurzbz);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Berechtigung extends APIv1_Controller
|
||||
{
|
||||
$result = $this->BerechtigungModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Berechtigung extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($berechtigung = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ class CallerLibrary extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
parent::__construct(array('Call' => 'basis/callerlibrary:rw'));
|
||||
|
||||
// Loads the CallerLib
|
||||
$this->load->library('CallerLib');
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class CallerLibrary extends APIv1_Controller
|
||||
// Print the result
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ class CallerLibrary extends APIv1_Controller
|
||||
// Print the result
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -74,4 +74,4 @@ class CallerLibrary extends APIv1_Controller
|
||||
// Print the result
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ class CallerModel extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
parent::__construct(array('Call' => 'basis/callermodel:rw'));
|
||||
|
||||
// Loads the CallerLib
|
||||
$this->load->library('CallerLib');
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class CallerModel extends APIv1_Controller
|
||||
// Print the result
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ class CallerModel extends APIv1_Controller
|
||||
// Print the result
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -74,4 +74,4 @@ class CallerModel extends APIv1_Controller
|
||||
// Print the result
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Cronjob extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Cronjob' => 'basis/cronjob:rw'));
|
||||
// Load model CronjobModel
|
||||
$this->load->model('system/cronjob_model', 'CronjobModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Cronjob extends APIv1_Controller
|
||||
public function getCronjob()
|
||||
{
|
||||
$cronjobID = $this->get('cronjob_id');
|
||||
|
||||
|
||||
if (isset($cronjobID))
|
||||
{
|
||||
$result = $this->CronjobModel->load($cronjobID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Cronjob extends APIv1_Controller
|
||||
{
|
||||
$result = $this->CronjobModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Cronjob extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($cronjob = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Filter extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Filter' => 'basis/filter:rw'));
|
||||
// Load model FilterModel
|
||||
$this->load->model('system/filter_model', 'FilterModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Filter extends APIv1_Controller
|
||||
public function getFilter()
|
||||
{
|
||||
$filterID = $this->get('filter_id');
|
||||
|
||||
|
||||
if (isset($filterID))
|
||||
{
|
||||
$result = $this->FilterModel->load($filterID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Filter extends APIv1_Controller
|
||||
{
|
||||
$result = $this->FilterModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Filter extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($filter = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Log extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Log' => 'basis/log:rw'));
|
||||
// Load model LogModel
|
||||
$this->load->model('system/log_model', 'LogModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Log extends APIv1_Controller
|
||||
public function getLog()
|
||||
{
|
||||
$logID = $this->get('log_id');
|
||||
|
||||
|
||||
if (isset($logID))
|
||||
{
|
||||
$result = $this->LogModel->load($logID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Log extends APIv1_Controller
|
||||
{
|
||||
$result = $this->LogModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Log extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($log = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,18 @@ class Message extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(
|
||||
array(
|
||||
'MessagesByPersonID' => 'basis/message:r',
|
||||
'MessagesByUID' => 'basis/message:r',
|
||||
'MessagesByToken' => 'basis/message:r',
|
||||
'SentMessagesByPerson' => 'basis/message:r',
|
||||
'CountUnreadMessages' => 'basis/message:r',
|
||||
'Message' => 'basis/message:w',
|
||||
'MessageVorlage' => 'basis/message:w',
|
||||
'ChangeStatus' => 'basis/message:w'
|
||||
)
|
||||
);
|
||||
// Load library MessageLib
|
||||
$this->load->library('MessageLib');
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class Phrase extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Phrase' => 'system/phrase:rw', 'Phrases' => 'system/phrase:r'));
|
||||
$this->load->library('PhrasesLib');
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ class Phrase extends APIv1_Controller
|
||||
public function getPhrase()
|
||||
{
|
||||
$phrase_id = $this->get('phrase_id');
|
||||
|
||||
|
||||
if (isset($phrase_id))
|
||||
{
|
||||
$result = $this->phraseslib->getPhrase($phrase_id);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -43,7 +43,7 @@ class Phrase extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -55,11 +55,11 @@ class Phrase extends APIv1_Controller
|
||||
$orgeinheit_kurzbz = $this->get('orgeinheit_kurzbz');
|
||||
$orgform_kurzbz = $this->get('orgform_kurzbz');
|
||||
$blockTags = $this->get('blockTags');
|
||||
|
||||
|
||||
if (isset($app) && isset($sprache))
|
||||
{
|
||||
$result = $this->phraseslib->getPhrases($app, $sprache, $phrase, $orgeinheit_kurzbz, $orgform_kurzbz, $blockTags);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -83,7 +83,7 @@ class Phrase extends APIv1_Controller
|
||||
{
|
||||
$result = $this->PhraseModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -91,9 +91,9 @@ class Phrase extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($phrase = null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Rolle extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Rolle' => 'basis/rolle:rw'));
|
||||
// Load model RolleModel
|
||||
$this->load->model('system/rolle_model', 'RolleModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Rolle extends APIv1_Controller
|
||||
public function getRolle()
|
||||
{
|
||||
$rolle_kurzbz = $this->get('rolle_kurzbz');
|
||||
|
||||
|
||||
if (isset($rolle_kurzbz))
|
||||
{
|
||||
$result = $this->RolleModel->load($rolle_kurzbz);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Rolle extends APIv1_Controller
|
||||
{
|
||||
$result = $this->RolleModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Rolle extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($rolle = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Rolleberechtigung extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Rolleberechtigung' => 'basis/rolleberechtigung:rw'));
|
||||
// Load model RolleberechtigungModel
|
||||
$this->load->model('system/rolleberechtigung_model', 'RolleberechtigungModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,11 +35,11 @@ class Rolleberechtigung extends APIv1_Controller
|
||||
{
|
||||
$rolle_kurzbz = $this->get('rolle_kurzbz');
|
||||
$berechtigung_kurzbz = $this->get('berechtigung_kurzbz');
|
||||
|
||||
|
||||
if (isset($rolle_kurzbz) && isset($berechtigung_kurzbz))
|
||||
{
|
||||
$result = $this->RolleberechtigungModel->load(array($rolle_kurzbz, $berechtigung_kurzbz));
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -63,7 +63,7 @@ class Rolleberechtigung extends APIv1_Controller
|
||||
{
|
||||
$result = $this->RolleberechtigungModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -71,9 +71,9 @@ class Rolleberechtigung extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($rolleberechtigung = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Server extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Server' => 'basis/server:rw'));
|
||||
// Load model ServerModel
|
||||
$this->load->model('system/server_model', 'ServerModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Server extends APIv1_Controller
|
||||
public function getServer()
|
||||
{
|
||||
$server_kurzbz = $this->get('server_kurzbz');
|
||||
|
||||
|
||||
if (isset($server_kurzbz))
|
||||
{
|
||||
$result = $this->ServerModel->load($server_kurzbz);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Server extends APIv1_Controller
|
||||
{
|
||||
$result = $this->ServerModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Server extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($server = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Sprache2 extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Sprache' => 'basis/sprache:rw'));
|
||||
// Load model SpracheModel
|
||||
$this->load->model('system/sprache_model', 'SpracheModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,9 +34,9 @@ class Sprache2 extends APIv1_Controller
|
||||
public function getSprache()
|
||||
{
|
||||
$sprache = $this->get('sprache');
|
||||
|
||||
|
||||
$result = $this->SpracheModel->load($sprache);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class Sprache2 extends APIv1_Controller
|
||||
{
|
||||
$result = $this->SpracheModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -63,7 +63,7 @@ class Sprache2 extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($sprache = NULL)
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -21,11 +21,11 @@ class Tag extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Tag' => 'basis/tag:rw'));
|
||||
// Load model TagModel
|
||||
$this->load->model('system/tag_model', 'TagModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Tag extends APIv1_Controller
|
||||
public function getTag()
|
||||
{
|
||||
$tag = $this->get('tag');
|
||||
|
||||
|
||||
if (isset($tag))
|
||||
{
|
||||
$result = $this->TagModel->load($tag);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Tag extends APIv1_Controller
|
||||
{
|
||||
$result = $this->TagModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Tag extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($tag = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ class UDF extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
parent::__construct(array('UDF' => 'system/udf:rw'));
|
||||
|
||||
// Load model UDF_model
|
||||
$this->load->model('system/UDF_model', 'UDFModel');
|
||||
}
|
||||
@@ -35,9 +35,9 @@ class UDF extends APIv1_Controller
|
||||
$decode = $this->get('decode');
|
||||
$schema = $this->get('schema');
|
||||
$table = $this->get('table');
|
||||
|
||||
|
||||
$result = error();
|
||||
|
||||
|
||||
if (isset($schema) || isset($table))
|
||||
{
|
||||
$result = $this->UDFModel->loadWhere(
|
||||
@@ -51,23 +51,23 @@ class UDF extends APIv1_Controller
|
||||
{
|
||||
$result = $this->UDFModel->load();
|
||||
}
|
||||
|
||||
|
||||
if ($decode)
|
||||
{
|
||||
$this->_jsonDecodeResult($result);
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function postUDF()
|
||||
{
|
||||
$udfs = $this->post();
|
||||
$validation = $this->_validate($udfs);
|
||||
|
||||
|
||||
if (isSuccess($validation))
|
||||
{
|
||||
$caller = null;
|
||||
@@ -76,9 +76,9 @@ class UDF extends APIv1_Controller
|
||||
$caller = $udfs['caller'];
|
||||
unset($udfs['caller']);
|
||||
}
|
||||
|
||||
|
||||
$result = $this->UDFModel->saveUDFs($udfs);
|
||||
|
||||
|
||||
if ($caller != null)
|
||||
{
|
||||
$res = 'ERR';
|
||||
@@ -86,7 +86,7 @@ class UDF extends APIv1_Controller
|
||||
{
|
||||
$res = 'OK';
|
||||
}
|
||||
|
||||
|
||||
redirect($caller.'&res='.$res);
|
||||
}
|
||||
else
|
||||
@@ -99,23 +99,23 @@ class UDF extends APIv1_Controller
|
||||
$this->response($validation, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
private function _validate($udfs)
|
||||
{
|
||||
$validation = error('person_id or prestudent_id is missing');
|
||||
|
||||
|
||||
if((isset($udfs['person_id']) && !(is_null($udfs['person_id'])) && ($udfs['person_id'] != ''))
|
||||
|| (isset($udfs['prestudent_id']) && !(is_null($udfs['prestudent_id'])) && ($udfs['prestudent_id'] != '')))
|
||||
{
|
||||
$validation = success(true);
|
||||
}
|
||||
|
||||
|
||||
return $validation;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Decode to json the column jsons for every result set
|
||||
*/
|
||||
@@ -130,4 +130,4 @@ class UDF extends APIv1_Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Variable extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Variable' => 'basis/variable:rw'));
|
||||
// Load model VariableModel
|
||||
$this->load->model('system/variable_model', 'VariableModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,11 +35,11 @@ class Variable extends APIv1_Controller
|
||||
{
|
||||
$uid = $this->get('uid');
|
||||
$name = $this->get('name');
|
||||
|
||||
|
||||
if (isset($uid) && isset($name))
|
||||
{
|
||||
$result = $this->VariableModel->load(array($uid, $name));
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -63,7 +63,7 @@ class Variable extends APIv1_Controller
|
||||
{
|
||||
$result = $this->VariableModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -71,9 +71,9 @@ class Variable extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($variable = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Vorlage extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Vorlage' => 'system/vorlage:rw'));
|
||||
// Load model VorlageModel
|
||||
$this->load->model('system/vorlage_model', 'VorlageModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Vorlage extends APIv1_Controller
|
||||
public function getVorlage()
|
||||
{
|
||||
$vorlage_kurzbz = $this->get('vorlage_kurzbz');
|
||||
|
||||
|
||||
if (isset($vorlage_kurzbz))
|
||||
{
|
||||
$result = $this->VorlageModel->load($vorlage_kurzbz);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Vorlage extends APIv1_Controller
|
||||
{
|
||||
$result = $this->VorlageModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Vorlage extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($vorlage = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Vorlagestudiengang extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Vorlagestudiengang' => 'system/vorlagestudiengang:rw'));
|
||||
// Load model VorlagestudiengangModel
|
||||
$this->load->model('system/vorlagestudiengang_model', 'VorlagestudiengangModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Vorlagestudiengang extends APIv1_Controller
|
||||
public function getVorlagestudiengang()
|
||||
{
|
||||
$vorlagestudiengangID = $this->get('vorlagestudiengang_id');
|
||||
|
||||
|
||||
if (isset($vorlagestudiengangID))
|
||||
{
|
||||
$result = $this->VorlagestudiengangModel->load($vorlagestudiengangID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Vorlagestudiengang extends APIv1_Controller
|
||||
{
|
||||
$result = $this->VorlagestudiengangModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Vorlagestudiengang extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($vorlagestudiengang = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Webservicelog extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Webservicelog' => 'basis/webservicelog:rw'));
|
||||
// Load model WebservicelogModel
|
||||
$this->load->model('system/webservicelog_model', 'WebservicelogModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Webservicelog extends APIv1_Controller
|
||||
public function getWebservicelog()
|
||||
{
|
||||
$webservicelogID = $this->get('webservicelog_id');
|
||||
|
||||
|
||||
if (isset($webservicelogID))
|
||||
{
|
||||
$result = $this->WebservicelogModel->load($webservicelogID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Webservicelog extends APIv1_Controller
|
||||
{
|
||||
$result = $this->WebservicelogModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Webservicelog extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($webservicelog = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Webservicerecht extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Webservicerecht' => 'basis/webservicerecht:rw'));
|
||||
// Load model WebservicerechtModel
|
||||
$this->load->model('system/webservicerecht_model', 'WebservicerechtModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Webservicerecht extends APIv1_Controller
|
||||
public function getWebservicerecht()
|
||||
{
|
||||
$webservicerechtID = $this->get('webservicerecht_id');
|
||||
|
||||
|
||||
if (isset($webservicerechtID))
|
||||
{
|
||||
$result = $this->WebservicerechtModel->load($webservicerechtID);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Webservicerecht extends APIv1_Controller
|
||||
{
|
||||
$result = $this->WebservicerechtModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Webservicerecht extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($webservicerecht = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class Webservicetyp extends APIv1_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(array('Webservicetyp' => 'basis/webservicetyp:rw'));
|
||||
// Load model WebservicetypModel
|
||||
$this->load->model('system/webservicetyp_model', 'WebservicetypModel');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,11 +34,11 @@ class Webservicetyp extends APIv1_Controller
|
||||
public function getWebservicetyp()
|
||||
{
|
||||
$webservicetyp_kurzbz = $this->get('webservicetyp_kurzbz');
|
||||
|
||||
|
||||
if (isset($webservicetyp_kurzbz))
|
||||
{
|
||||
$result = $this->WebservicetypModel->load($webservicetyp_kurzbz);
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -62,7 +62,7 @@ class Webservicetyp extends APIv1_Controller
|
||||
{
|
||||
$result = $this->WebservicetypModel->insert($this->post());
|
||||
}
|
||||
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
@@ -70,9 +70,9 @@ class Webservicetyp extends APIv1_Controller
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function _validate($webservicetyp = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user