diff --git a/application/controllers/api/v1/CheckUserAuth.php b/application/controllers/api/v1/CheckUserAuth.php index ac4195808..1221e6765 100644 --- a/application/controllers/api/v1/CheckUserAuth.php +++ b/application/controllers/api/v1/CheckUserAuth.php @@ -14,7 +14,9 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class CheckUserAuth extends APIv1_Controller +require_once APPPATH.'/libraries/REST_Controller.php'; + +class CheckUserAuth extends REST_Controller { /** * Course API constructor. diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php index fd1896560..b9eacd5f9 100644 --- a/application/controllers/api/v1/Test.php +++ b/application/controllers/api/v1/Test.php @@ -2,14 +2,19 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); +require_once APPPATH.'/libraries/REST_Controller.php'; + /** * Testing class for REST calls and authentication */ -class Test extends APIv1_Controller +class Test extends REST_Controller { public function __construct() { parent::__construct(); + + // Loads return messages + $this->load->helper('message'); } /** diff --git a/application/controllers/api/v1/accounting/Aufteilung.php b/application/controllers/api/v1/accounting/Aufteilung.php index 6c374ba17..cc9c2826f 100644 --- a/application/controllers/api/v1/accounting/Aufteilung.php +++ b/application/controllers/api/v1/accounting/Aufteilung.php @@ -21,7 +21,7 @@ class Aufteilung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aufteilung' => 'basis/aufteilung:rw')); // Load model AufteilungModel $this->load->model('accounting/aufteilung_model', 'AufteilungModel'); } @@ -32,11 +32,11 @@ class Aufteilung extends APIv1_Controller public function getAufteilung() { $aufteilungID = $this->get('aufteilung_id'); - + if (isset($aufteilungID)) { $result = $this->AufteilungModel->load($aufteilungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Aufteilung extends APIv1_Controller { $result = $this->AufteilungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Aufteilung extends APIv1_Controller $this->response(); } } - + private function _validate($aufteilung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Bestelldetail.php b/application/controllers/api/v1/accounting/Bestelldetail.php index 6cc7d8767..191ba95a0 100644 --- a/application/controllers/api/v1/accounting/Bestelldetail.php +++ b/application/controllers/api/v1/accounting/Bestelldetail.php @@ -21,7 +21,7 @@ class Bestelldetail extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bestelldetail' => 'basis/bestelldetail:rw')); // Load model BestelldetailModel $this->load->model('accounting/bestelldetail_model', 'BestelldetailModel'); } @@ -32,11 +32,11 @@ class Bestelldetail extends APIv1_Controller public function getBestelldetail() { $bestelldetailID = $this->get('bestelldetail_id'); - + if (isset($bestelldetailID)) { $result = $this->BestelldetailModel->load($bestelldetailID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Bestelldetail extends APIv1_Controller { $result = $this->BestelldetailModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Bestelldetail extends APIv1_Controller $this->response(); } } - + private function _validate($bestelldetail = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Bestelldetailtag.php b/application/controllers/api/v1/accounting/Bestelldetailtag.php index 064594f39..36229d47c 100644 --- a/application/controllers/api/v1/accounting/Bestelldetailtag.php +++ b/application/controllers/api/v1/accounting/Bestelldetailtag.php @@ -21,7 +21,7 @@ class Bestelldetailtag extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bestelldetailtag' => 'basis/bestelldetailtag:rw')); // Load model BestelldetailtagModel $this->load->model('accounting/bestelldetailtag_model', 'BestelldetailtagModel'); } @@ -33,11 +33,11 @@ class Bestelldetailtag extends APIv1_Controller { $bestelldetail_id = $this->get('bestelldetail_id'); $tag = $this->get('tag'); - + if (isset($bestelldetail_id) && isset($tag)) { $result = $this->BestelldetailtagModel->load(array($bestelldetail_id, $tag)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Bestelldetailtag extends APIv1_Controller { $result = $this->BestelldetailtagModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Bestelldetailtag extends APIv1_Controller $this->response(); } } - + private function _validate($bestelldetailtag = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Bestellstatus.php b/application/controllers/api/v1/accounting/Bestellstatus.php index 85408c820..dc3695ff2 100644 --- a/application/controllers/api/v1/accounting/Bestellstatus.php +++ b/application/controllers/api/v1/accounting/Bestellstatus.php @@ -21,7 +21,7 @@ class Bestellstatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bestellstatus' => 'basis/bestellstatus:rw')); // Load model BestellstatusModel $this->load->model('accounting/bestellstatus_model', 'BestellstatusModel'); } @@ -32,11 +32,11 @@ class Bestellstatus extends APIv1_Controller public function getBestellstatus() { $bestellstatus_kurzbz = $this->get('bestellstatus_kurzbz'); - + if (isset($bestellstatus_kurzbz)) { $result = $this->BestellstatusModel->load($bestellstatus_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Bestellstatus extends APIv1_Controller { $result = $this->BestellstatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Bestellstatus extends APIv1_Controller $this->response(); } } - + private function _validate($bestellstatus = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Bestellung.php b/application/controllers/api/v1/accounting/Bestellung.php index 984b5b89b..018b77180 100644 --- a/application/controllers/api/v1/accounting/Bestellung.php +++ b/application/controllers/api/v1/accounting/Bestellung.php @@ -21,7 +21,7 @@ class Bestellung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bestellung' => 'basis/bestellung:rw')); // Load model BestellungModel $this->load->model('accounting/bestellung_model', 'BestellungModel'); } @@ -32,11 +32,11 @@ class Bestellung extends APIv1_Controller public function getBestellung() { $bestellungID = $this->get('bestellung_id'); - + if (isset($bestellungID)) { $result = $this->BestellungModel->load($bestellungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Bestellung extends APIv1_Controller { $result = $this->BestellungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Bestellung extends APIv1_Controller $this->response(); } } - + private function _validate($bestellung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Bestellungtag.php b/application/controllers/api/v1/accounting/Bestellungtag.php index c8d715a5b..7b404fa05 100644 --- a/application/controllers/api/v1/accounting/Bestellungtag.php +++ b/application/controllers/api/v1/accounting/Bestellungtag.php @@ -21,7 +21,7 @@ class Bestellungtag extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bestellungtag' => 'basis/bestellungtag:rw')); // Load model BestellungtagModel $this->load->model('accounting/bestellungtag_model', 'BestellungtagModel'); } @@ -33,11 +33,11 @@ class Bestellungtag extends APIv1_Controller { $bestellung_id = $this->get('bestellung_id'); $tag = $this->get('tag'); - + if (isset($bestellung_id) && isset($tag)) { $result = $this->BestellungtagModel->load(array($bestellung_id, $tag)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Bestellungtag extends APIv1_Controller { $result = $this->BestellungtagModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Bestellungtag extends APIv1_Controller $this->response(); } } - + private function _validate($bestellungtag = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Buchung.php b/application/controllers/api/v1/accounting/Buchung.php index d40974a88..12fa02c33 100644 --- a/application/controllers/api/v1/accounting/Buchung.php +++ b/application/controllers/api/v1/accounting/Buchung.php @@ -21,7 +21,7 @@ class Buchung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Buchung' => 'basis/buchung:r')); // Load model BuchungModel $this->load->model('accounting/buchung_model', 'BuchungModel'); } @@ -32,11 +32,11 @@ class Buchung extends APIv1_Controller public function getBuchung() { $buchungID = $this->get('buchung_id'); - + if (isset($buchungID)) { $result = $this->BuchungModel->load($buchungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Buchung extends APIv1_Controller { $result = $this->BuchungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Buchung extends APIv1_Controller $this->response(); } } - + private function _validate($buchung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Buchungstyp.php b/application/controllers/api/v1/accounting/Buchungstyp.php index 50efa179f..3e9718469 100644 --- a/application/controllers/api/v1/accounting/Buchungstyp.php +++ b/application/controllers/api/v1/accounting/Buchungstyp.php @@ -21,7 +21,7 @@ class Buchungstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Buchungstyp' => 'basis/buchungstyp:rw')); // Load model BuchungstypModel $this->load->model('accounting/buchungstyp_model', 'BuchungstypModel'); } @@ -32,11 +32,11 @@ class Buchungstyp extends APIv1_Controller public function getBuchungstyp() { $buchungstyp_kurzbz = $this->get('buchungstyp_kurzbz'); - + if (isset($buchungstyp_kurzbz)) { $result = $this->BuchungstypModel->load($buchungstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Buchungstyp extends APIv1_Controller { $result = $this->BuchungstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Buchungstyp extends APIv1_Controller $this->response(); } } - + private function _validate($buchungstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Budget.php b/application/controllers/api/v1/accounting/Budget.php index 2af229a5f..31ee3ef1c 100644 --- a/application/controllers/api/v1/accounting/Budget.php +++ b/application/controllers/api/v1/accounting/Budget.php @@ -21,7 +21,7 @@ class Budget extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Budget' => 'basis/budget:rw')); // Load model BudgetModel $this->load->model('accounting/budget_model', 'BudgetModel'); } @@ -33,11 +33,11 @@ class Budget extends APIv1_Controller { $kostenstelle_id = $this->get('kostenstelle_id'); $geschaeftsjahr_kurzbz = $this->get('geschaeftsjahr_kurzbz'); - + if (isset($kostenstelle_id) && isset($geschaeftsjahr_kurzbz)) { $result = $this->BudgetModel->load(array($kostenstelle_id, $geschaeftsjahr_kurzbz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Budget extends APIv1_Controller { $result = $this->BudgetModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Budget extends APIv1_Controller $this->response(); } } - + private function _validate($budget = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Konto.php b/application/controllers/api/v1/accounting/Konto.php index e56a9b0d6..0b78ff98f 100644 --- a/application/controllers/api/v1/accounting/Konto.php +++ b/application/controllers/api/v1/accounting/Konto.php @@ -21,7 +21,7 @@ class Konto extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Konto' => 'basis/konto:rw')); // Load model KontoModel $this->load->model('accounting/konto_model', 'KontoModel'); } @@ -32,11 +32,11 @@ class Konto extends APIv1_Controller public function getKonto() { $kontoID = $this->get('konto_id'); - + if (isset($kontoID)) { $result = $this->KontoModel->load($kontoID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Konto extends APIv1_Controller { $result = $this->KontoModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Konto extends APIv1_Controller $this->response(); } } - + private function _validate($konto = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Kostenstelle.php b/application/controllers/api/v1/accounting/Kostenstelle.php index 813039245..2ebf554c0 100644 --- a/application/controllers/api/v1/accounting/Kostenstelle.php +++ b/application/controllers/api/v1/accounting/Kostenstelle.php @@ -21,7 +21,7 @@ class Kostenstelle extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Kostenstelle' => 'basis/kostenstelle:rw')); // Load model KostenstelleModel $this->load->model('accounting/kostenstelle_model', 'KostenstelleModel'); } @@ -32,11 +32,11 @@ class Kostenstelle extends APIv1_Controller public function getKostenstelle() { $kostenstelleID = $this->get('kostenstelle_id'); - + if (isset($kostenstelleID)) { $result = $this->KostenstelleModel->load($kostenstelleID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Kostenstelle extends APIv1_Controller { $result = $this->KostenstelleModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Kostenstelle extends APIv1_Controller $this->response(); } } - + private function _validate($kostenstelle = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Rechnung.php b/application/controllers/api/v1/accounting/Rechnung.php index 015c8ac57..5ac77b36b 100644 --- a/application/controllers/api/v1/accounting/Rechnung.php +++ b/application/controllers/api/v1/accounting/Rechnung.php @@ -21,7 +21,7 @@ class Rechnung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Rechnung' => 'basis/rechnung:rw')); // Load model RechnungModel $this->load->model('accounting/rechnung_model', 'RechnungModel'); } @@ -32,11 +32,11 @@ class Rechnung extends APIv1_Controller public function getRechnung() { $rechnungID = $this->get('rechnung_id'); - + if (isset($rechnungID)) { $result = $this->RechnungModel->load($rechnungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Rechnung extends APIv1_Controller { $result = $this->RechnungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Rechnung extends APIv1_Controller $this->response(); } } - + private function _validate($rechnung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Rechnungsbetrag.php b/application/controllers/api/v1/accounting/Rechnungsbetrag.php index 7ed6e46a5..2f02c794d 100644 --- a/application/controllers/api/v1/accounting/Rechnungsbetrag.php +++ b/application/controllers/api/v1/accounting/Rechnungsbetrag.php @@ -21,7 +21,7 @@ class Rechnungsbetrag extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Rechnungsbetrag' => 'basis/rechnungsbetrag:rw')); // Load model RechnungsbetragModel $this->load->model('accounting/rechnungsbetrag_model', 'RechnungsbetragModel'); } @@ -32,11 +32,11 @@ class Rechnungsbetrag extends APIv1_Controller public function getRechnungsbetrag() { $rechnungsbetragID = $this->get('rechnungsbetrag_id'); - + if (isset($rechnungsbetragID)) { $result = $this->RechnungsbetragModel->load($rechnungsbetragID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Rechnungsbetrag extends APIv1_Controller { $result = $this->RechnungsbetragModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Rechnungsbetrag extends APIv1_Controller $this->response(); } } - + private function _validate($rechnungsbetrag = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Rechnungstyp.php b/application/controllers/api/v1/accounting/Rechnungstyp.php index 507d4c074..f85dae43e 100644 --- a/application/controllers/api/v1/accounting/Rechnungstyp.php +++ b/application/controllers/api/v1/accounting/Rechnungstyp.php @@ -21,7 +21,7 @@ class Rechnungstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Rechnungstyp' => 'basis/rechnungstyp:rw')); // Load model RechnungstypModel $this->load->model('accounting/rechnungstyp_model', 'RechnungstypModel'); } @@ -32,11 +32,11 @@ class Rechnungstyp extends APIv1_Controller public function getRechnungstyp() { $rechnungstyp_kurzbz = $this->get('rechnungstyp_kurzbz'); - + if (isset($rechnungstyp_kurzbz)) { $result = $this->RechnungstypModel->load($rechnungstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Rechnungstyp extends APIv1_Controller { $result = $this->RechnungstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Rechnungstyp extends APIv1_Controller $this->response(); } } - + private function _validate($rechnungstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Vertrag.php b/application/controllers/api/v1/accounting/Vertrag.php index f627db74a..3b3d3fac2 100644 --- a/application/controllers/api/v1/accounting/Vertrag.php +++ b/application/controllers/api/v1/accounting/Vertrag.php @@ -21,7 +21,7 @@ class Vertrag extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Vertrag' => 'basis/vertrag:rw')); // Load model VertragModel $this->load->model('accounting/vertrag_model', 'VertragModel'); } @@ -32,11 +32,11 @@ class Vertrag extends APIv1_Controller public function getVertrag() { $vertragID = $this->get('vertrag_id'); - + if (isset($vertragID)) { $result = $this->VertragModel->load($vertragID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Vertrag extends APIv1_Controller { $result = $this->VertragModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Vertrag extends APIv1_Controller $this->response(); } } - + private function _validate($vertrag = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Vertragsstatus.php b/application/controllers/api/v1/accounting/Vertragsstatus.php index bfe3a5f3f..c6125e609 100644 --- a/application/controllers/api/v1/accounting/Vertragsstatus.php +++ b/application/controllers/api/v1/accounting/Vertragsstatus.php @@ -21,7 +21,7 @@ class Vertragsstatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Vertragsstatus' => 'basis/vertragsstatus:rw')); // Load model VertragsstatusModel $this->load->model('accounting/vertragsstatus_model', 'VertragsstatusModel'); } @@ -32,11 +32,11 @@ class Vertragsstatus extends APIv1_Controller public function getVertragsstatus() { $vertragsstatus_kurzbz = $this->get('vertragsstatus_kurzbz'); - + if (isset($vertragsstatus_kurzbz)) { $result = $this->VertragsstatusModel->load($vertragsstatus_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Vertragsstatus extends APIv1_Controller { $result = $this->VertragsstatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Vertragsstatus extends APIv1_Controller $this->response(); } } - + private function _validate($vertragsstatus = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Vertragstyp.php b/application/controllers/api/v1/accounting/Vertragstyp.php index 025d39c16..69b0907dd 100644 --- a/application/controllers/api/v1/accounting/Vertragstyp.php +++ b/application/controllers/api/v1/accounting/Vertragstyp.php @@ -21,7 +21,7 @@ class Vertragstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Vertragstyp' => 'basis/vertragstyp:rw')); // Load model VertragstypModel $this->load->model('accounting/vertragstyp_model', 'VertragstypModel'); } @@ -32,11 +32,11 @@ class Vertragstyp extends APIv1_Controller public function getVertragstyp() { $vertragstyp_kurzbz = $this->get('vertragstyp_kurzbz'); - + if (isset($vertragstyp_kurzbz)) { $result = $this->VertragstypModel->load($vertragstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Vertragstyp extends APIv1_Controller { $result = $this->VertragstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Vertragstyp extends APIv1_Controller $this->response(); } } - + private function _validate($vertragstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/accounting/Zahlungstyp.php b/application/controllers/api/v1/accounting/Zahlungstyp.php index dad2c9edb..e7abf74df 100644 --- a/application/controllers/api/v1/accounting/Zahlungstyp.php +++ b/application/controllers/api/v1/accounting/Zahlungstyp.php @@ -21,7 +21,7 @@ class Zahlungstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zahlungstyp' => 'basis/zahlungstyp:rw')); // Load model ZahlungstypModel $this->load->model('accounting/zahlungstyp_model', 'ZahlungstypModel'); } @@ -32,11 +32,11 @@ class Zahlungstyp extends APIv1_Controller public function getZahlungstyp() { $zahlungstyp_kurzbz = $this->get('zahlungstyp_kurzbz'); - + if (isset($zahlungstyp_kurzbz)) { $result = $this->ZahlungstypModel->load($zahlungstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zahlungstyp extends APIv1_Controller { $result = $this->ZahlungstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zahlungstyp extends APIv1_Controller $this->response(); } } - + private function _validate($zahlungstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Akadgrad.php b/application/controllers/api/v1/codex/Akadgrad.php index 5ee160709..2aeb01e59 100644 --- a/application/controllers/api/v1/codex/Akadgrad.php +++ b/application/controllers/api/v1/codex/Akadgrad.php @@ -21,7 +21,7 @@ class Akadgrad extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Akadgrad' => 'basis/akadgrad:rw')); // Load model AkadgradModel $this->load->model('codex/akadgrad_model', 'AkadgradModel'); } @@ -32,11 +32,11 @@ class Akadgrad extends APIv1_Controller public function getAkadgrad() { $akadgradID = $this->get('akadgrad_id'); - + if (isset($akadgradID)) { $result = $this->AkadgradModel->load($akadgradID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Akadgrad extends APIv1_Controller { $result = $this->AkadgradModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Akadgrad extends APIv1_Controller $this->response(); } } - + private function _validate($akadgrad = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Archiv.php b/application/controllers/api/v1/codex/Archiv.php index 8acc38af9..b35ec840d 100644 --- a/application/controllers/api/v1/codex/Archiv.php +++ b/application/controllers/api/v1/codex/Archiv.php @@ -21,7 +21,7 @@ class Archiv extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Archiv' => 'basis/archiv:rw')); // Load model ArchivModel $this->load->model('codex/archiv_model', 'ArchivModel'); } @@ -32,11 +32,11 @@ class Archiv extends APIv1_Controller public function getArchiv() { $archivID = $this->get('archiv_id'); - + if (isset($archivID)) { $result = $this->ArchivModel->load($archivID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Archiv extends APIv1_Controller { $result = $this->ArchivModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Archiv extends APIv1_Controller $this->response(); } } - + private function _validate($archiv = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Aufmerksamdurch.php b/application/controllers/api/v1/codex/Aufmerksamdurch.php index 7ba8269cd..dc27d4dd8 100644 --- a/application/controllers/api/v1/codex/Aufmerksamdurch.php +++ b/application/controllers/api/v1/codex/Aufmerksamdurch.php @@ -21,7 +21,7 @@ class Aufmerksamdurch extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aufmerksamdurch' => 'basis/aufmerksamdurch:rw')); // Load model AufmerksamdurchModel $this->load->model('codex/aufmerksamdurch_model', 'AufmerksamdurchModel'); } @@ -32,11 +32,11 @@ class Aufmerksamdurch extends APIv1_Controller public function getAufmerksamdurch() { $aufmerksamdurch_kurzbz = $this->get('aufmerksamdurch_kurzbz'); - + if (isset($aufmerksamdurch_kurzbz)) { $result = $this->AufmerksamdurchModel->load($aufmerksamdurch_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Aufmerksamdurch extends APIv1_Controller { $result = $this->AufmerksamdurchModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Aufmerksamdurch extends APIv1_Controller $this->response(); } } - + private function _validate($aufmerksamdurch = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Ausbildung.php b/application/controllers/api/v1/codex/Ausbildung.php index 277f12e59..4fea8add4 100644 --- a/application/controllers/api/v1/codex/Ausbildung.php +++ b/application/controllers/api/v1/codex/Ausbildung.php @@ -21,7 +21,7 @@ class Ausbildung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ausbildung' => 'basis/ausbildung:rw')); // Load model AusbildungModel $this->load->model('codex/ausbildung_model', 'AusbildungModel'); } @@ -32,11 +32,11 @@ class Ausbildung extends APIv1_Controller public function getAusbildung() { $ausbildungcode = $this->get('ausbildungcode'); - + if (isset($ausbildungcode)) { $result = $this->AusbildungModel->load($ausbildungcode); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Ausbildung extends APIv1_Controller { $result = $this->AusbildungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Ausbildung extends APIv1_Controller $this->response(); } } - + private function _validate($ausbildung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Berufstaetigkeit.php b/application/controllers/api/v1/codex/Berufstaetigkeit.php index 7618932e4..0941eba9e 100644 --- a/application/controllers/api/v1/codex/Berufstaetigkeit.php +++ b/application/controllers/api/v1/codex/Berufstaetigkeit.php @@ -21,7 +21,7 @@ class Berufstaetigkeit extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Berufstaetigkeit' => 'basis/berufstaetigkeit:rw')); // Load model BerufstaetigkeitModel $this->load->model('codex/berufstaetigkeit_model', 'BerufstaetigkeitModel'); } @@ -32,11 +32,11 @@ class Berufstaetigkeit extends APIv1_Controller public function getBerufstaetigkeit() { $berufstaetigkeit_code = $this->get('berufstaetigkeit_code'); - + if (isset($berufstaetigkeit_code)) { $result = $this->BerufstaetigkeitModel->load($berufstaetigkeit_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Berufstaetigkeit extends APIv1_Controller { $result = $this->BerufstaetigkeitModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Berufstaetigkeit extends APIv1_Controller $this->response(); } } - + private function _validate($berufstaetigkeit = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php index 63eba5ce1..115aa37fd 100644 --- a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php +++ b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php @@ -21,7 +21,7 @@ class Beschaeftigungsausmass extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Beschaeftigungsausmass' => 'basis/beschaeftigungsausmass:rw')); // Load model BeschaeftigungsausmassModel $this->load->model('codex/beschaeftigungsausmass_model', 'BeschaeftigungsausmassModel'); } @@ -32,11 +32,11 @@ class Beschaeftigungsausmass extends APIv1_Controller public function getBeschaeftigungsausmass() { $beschausmasscode = $this->get('beschausmasscode'); - + if (isset($beschausmasscode)) { $result = $this->BeschaeftigungsausmassModel->load($beschausmasscode); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Beschaeftigungsausmass extends APIv1_Controller { $result = $this->BeschaeftigungsausmassModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Beschaeftigungsausmass extends APIv1_Controller $this->response(); } } - + private function _validate($beschaeftigungsausmass = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Besqual.php b/application/controllers/api/v1/codex/Besqual.php index 419fab89a..6bad18ff7 100644 --- a/application/controllers/api/v1/codex/Besqual.php +++ b/application/controllers/api/v1/codex/Besqual.php @@ -21,7 +21,7 @@ class Besqual extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Besqual' => 'basis/besqual:rw')); // Load model BesqualModel $this->load->model('codex/besqual_model', 'BesqualModel'); } @@ -32,11 +32,11 @@ class Besqual extends APIv1_Controller public function getBesqual() { $besqualcode = $this->get('besqualcode'); - + if (isset($besqualcode)) { $result = $this->BesqualModel->load($besqualcode); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Besqual extends APIv1_Controller { $result = $this->BesqualModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Besqual extends APIv1_Controller $this->response(); } } - + private function _validate($besqual = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Bisfunktion.php b/application/controllers/api/v1/codex/Bisfunktion.php index 80d3ffbf6..85a7fca7b 100644 --- a/application/controllers/api/v1/codex/Bisfunktion.php +++ b/application/controllers/api/v1/codex/Bisfunktion.php @@ -21,7 +21,7 @@ class Bisfunktion extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bisfunktion' => 'basis/bisfunktion:rw')); // Load model BisfunktionModel $this->load->model('codex/bisfunktion_model', 'BisfunktionModel'); } @@ -33,11 +33,11 @@ class Bisfunktion extends APIv1_Controller { $studiengang_kz = $this->get('studiengang_kz'); $bisverwendung_id = $this->get('bisverwendung_id'); - + if (isset($studiengang_kz) && isset($bisverwendung_id)) { $result = $this->BisfunktionModel->load(array($studiengang_kz, $bisverwendung_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Bisfunktion extends APIv1_Controller { $result = $this->BisfunktionModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Bisfunktion extends APIv1_Controller $this->response(); } } - + private function _validate($bisfunktion = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Bisio.php b/application/controllers/api/v1/codex/Bisio.php index 3fe5171b1..1b0999bb1 100644 --- a/application/controllers/api/v1/codex/Bisio.php +++ b/application/controllers/api/v1/codex/Bisio.php @@ -21,7 +21,7 @@ class Bisio extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bisio' => 'basis/bisio:rw')); // Load model BisioModel $this->load->model('codex/bisio_model', 'BisioModel'); } @@ -32,11 +32,11 @@ class Bisio extends APIv1_Controller public function getBisio() { $bisioID = $this->get('bisio_id'); - + if (isset($bisioID)) { $result = $this->BisioModel->load($bisioID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Bisio extends APIv1_Controller { $result = $this->BisioModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Bisio extends APIv1_Controller $this->response(); } } - + private function _validate($bisio = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Bisorgform.php b/application/controllers/api/v1/codex/Bisorgform.php index 54bf7aa66..af72644c8 100644 --- a/application/controllers/api/v1/codex/Bisorgform.php +++ b/application/controllers/api/v1/codex/Bisorgform.php @@ -21,7 +21,7 @@ class Bisorgform extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bisorgform' => 'basis/bisorgform:rw')); // Load model BisorgformModel $this->load->model('codex/bisorgform_model', 'BisorgformModel'); } @@ -32,11 +32,11 @@ class Bisorgform extends APIv1_Controller public function getBisorgform() { $bisorgform_kurzbz = $this->get('bisorgform_kurzbz'); - + if (isset($bisorgform_kurzbz)) { $result = $this->BisorgformModel->load($bisorgform_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Bisorgform extends APIv1_Controller { $result = $this->BisorgformModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Bisorgform extends APIv1_Controller $this->response(); } } - + private function _validate($bisorgform = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Bisverwendung.php b/application/controllers/api/v1/codex/Bisverwendung.php index 2139ada3b..ee2b0d5ca 100644 --- a/application/controllers/api/v1/codex/Bisverwendung.php +++ b/application/controllers/api/v1/codex/Bisverwendung.php @@ -21,7 +21,7 @@ class Bisverwendung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bisverwendung' => 'basis/bisverwendung:rw')); // Load model BisverwendungModel $this->load->model('codex/bisverwendung_model', 'BisverwendungModel'); } @@ -32,11 +32,11 @@ class Bisverwendung extends APIv1_Controller public function getBisverwendung() { $bisverwendungID = $this->get('bisverwendung_id'); - + if (isset($bisverwendungID)) { $result = $this->BisverwendungModel->load($bisverwendungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Bisverwendung extends APIv1_Controller { $result = $this->BisverwendungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Bisverwendung extends APIv1_Controller $this->response(); } } - + private function _validate($bisverwendung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Bundesland.php b/application/controllers/api/v1/codex/Bundesland.php index 68d44f130..ccff4f047 100644 --- a/application/controllers/api/v1/codex/Bundesland.php +++ b/application/controllers/api/v1/codex/Bundesland.php @@ -21,7 +21,7 @@ class Bundesland extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('All' => 'basis/bundesland:r')); // Load model PersonModel $this->load->model('codex/bundesland_model', 'BundeslandModel'); } diff --git a/application/controllers/api/v1/codex/Entwicklungsteam.php b/application/controllers/api/v1/codex/Entwicklungsteam.php index 21b4dda91..bf376a842 100644 --- a/application/controllers/api/v1/codex/Entwicklungsteam.php +++ b/application/controllers/api/v1/codex/Entwicklungsteam.php @@ -21,7 +21,7 @@ class Entwicklungsteam extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Entwicklungsteam' => 'basis/entwicklungsteam:rw')); // Load model EntwicklungsteamModel $this->load->model('codex/entwicklungsteam_model', 'EntwicklungsteamModel'); } @@ -33,11 +33,11 @@ class Entwicklungsteam extends APIv1_Controller { $studiengang_kz = $this->get('studiengang_kz'); $mitarbeiter_uid = $this->get('mitarbeiter_uid'); - + if (isset($studiengang_kz) && isset($mitarbeiter_uid)) { $result = $this->EntwicklungsteamModel->load(array($studiengang_kz, $mitarbeiter_uid)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Entwicklungsteam extends APIv1_Controller { $result = $this->EntwicklungsteamModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Entwicklungsteam extends APIv1_Controller $this->response(); } } - + private function _validate($entwicklungsteam = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Gemeinde.php b/application/controllers/api/v1/codex/Gemeinde.php index 52b879598..255498b4b 100644 --- a/application/controllers/api/v1/codex/Gemeinde.php +++ b/application/controllers/api/v1/codex/Gemeinde.php @@ -21,7 +21,7 @@ class Gemeinde extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Gemeinde' => 'basis/gemeinde:rw', 'GemeindeByPlz' => 'basis/gemeinde:r')); // Load model GemeindeModel $this->load->model("codex/gemeinde_model", "GemeindeModel"); } @@ -32,7 +32,7 @@ class Gemeinde extends APIv1_Controller public function getGemeinde() { $gemeindeID = $this->get("gemeinde_id"); - + $this->GemeindeModel->addOrder("plz"); if (isset($gemeindeID)) { @@ -42,21 +42,21 @@ class Gemeinde extends APIv1_Controller { $result = $this->GemeindeModel->load(); } - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getGemeindeByPlz() { $plz = $this->get("plz"); - + if (is_numeric($plz)) { $result = $this->GemeindeModel->getGemeindeByPlz($plz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -80,7 +80,7 @@ class Gemeinde extends APIv1_Controller { $result = $this->GemeindeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -88,9 +88,9 @@ class Gemeinde extends APIv1_Controller $this->response(); } } - + private function _validate($gemeinde = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Hauptberuf.php b/application/controllers/api/v1/codex/Hauptberuf.php index bdce2872d..05396c473 100644 --- a/application/controllers/api/v1/codex/Hauptberuf.php +++ b/application/controllers/api/v1/codex/Hauptberuf.php @@ -21,7 +21,7 @@ class Hauptberuf extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Hauptberuf' => 'basis/hauptberuf:rw')); // Load model HauptberufModel $this->load->model('codex/hauptberuf_model', 'HauptberufModel'); } @@ -32,11 +32,11 @@ class Hauptberuf extends APIv1_Controller public function getHauptberuf() { $hauptberufcode = $this->get('hauptberufcode'); - + if (isset($hauptberufcode)) { $result = $this->HauptberufModel->load($hauptberufcode); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Hauptberuf extends APIv1_Controller { $result = $this->HauptberufModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Hauptberuf extends APIv1_Controller $this->response(); } } - + private function _validate($hauptberuf = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Lehrform.php b/application/controllers/api/v1/codex/Lehrform.php index 4cd48cecc..e789e76ec 100644 --- a/application/controllers/api/v1/codex/Lehrform.php +++ b/application/controllers/api/v1/codex/Lehrform.php @@ -21,7 +21,7 @@ class Lehrform extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrform' => 'basis/lehrform:rw')); // Load model LehrformModel $this->load->model('codex/lehrform_model', 'LehrformModel'); } @@ -32,11 +32,11 @@ class Lehrform extends APIv1_Controller public function getLehrform() { $lehrform_kurzbz = $this->get('lehrform_kurzbz'); - + if (isset($lehrform_kurzbz)) { $result = $this->LehrformModel->load($lehrform_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehrform extends APIv1_Controller { $result = $this->LehrformModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehrform extends APIv1_Controller $this->response(); } } - + private function _validate($lehrform = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Lgartcode.php b/application/controllers/api/v1/codex/Lgartcode.php index 14dadb1c1..5be7cab59 100644 --- a/application/controllers/api/v1/codex/Lgartcode.php +++ b/application/controllers/api/v1/codex/Lgartcode.php @@ -21,7 +21,7 @@ class Lgartcode extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lgartcode' => 'basis/lgartcode:rw')); // Load model LgartcodeModel $this->load->model('codex/lgartcode_model', 'LgartcodeModel'); } @@ -32,11 +32,11 @@ class Lgartcode extends APIv1_Controller public function getLgartcode() { $lgartcode = $this->get('lgartcode'); - + if (isset($lgartcode)) { $result = $this->LgartcodeModel->load($lgartcode); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lgartcode extends APIv1_Controller { $result = $this->LgartcodeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lgartcode extends APIv1_Controller $this->response(); } } - + private function _validate($lgartcode = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php index b182a6f00..70f0c3dc6 100644 --- a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php +++ b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php @@ -21,7 +21,7 @@ class Mobilitaetsprogramm extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Mobilitaetsprogramm' => 'basis/mobilitaetsprogramm:rw')); // Load model MobilitaetsprogrammModel $this->load->model('codex/mobilitaetsprogramm_model', 'MobilitaetsprogrammModel'); } @@ -32,11 +32,11 @@ class Mobilitaetsprogramm extends APIv1_Controller public function getMobilitaetsprogramm() { $mobilitaetsprogramm_code = $this->get('mobilitaetsprogramm_code'); - + if (isset($mobilitaetsprogramm_code)) { $result = $this->MobilitaetsprogrammModel->load($mobilitaetsprogramm_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Mobilitaetsprogramm extends APIv1_Controller { $result = $this->MobilitaetsprogrammModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Mobilitaetsprogramm extends APIv1_Controller $this->response(); } } - + private function _validate($mobilitaetsprogramm = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php index 2bf8f8dd5..a8074bd82 100644 --- a/application/controllers/api/v1/codex/Nation.php +++ b/application/controllers/api/v1/codex/Nation.php @@ -21,7 +21,7 @@ class Nation extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Nation' => 'basis/nation:r', 'All' => 'basis/nation:r')); // Load model NationModel $this->load->model('codex/nation_model', 'NationModel'); } diff --git a/application/controllers/api/v1/codex/Note.php b/application/controllers/api/v1/codex/Note.php index a6ddc6741..f42032fe5 100644 --- a/application/controllers/api/v1/codex/Note.php +++ b/application/controllers/api/v1/codex/Note.php @@ -21,7 +21,7 @@ class Note extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Note' => 'basis/note:rw')); // Load model NoteModel $this->load->model('codex/note_model', 'NoteModel'); } @@ -32,11 +32,11 @@ class Note extends APIv1_Controller public function getNote() { $note = $this->get('note'); - + if (isset($note)) { $result = $this->NoteModel->load($note); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Note extends APIv1_Controller { $result = $this->NoteModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Note extends APIv1_Controller $this->response(); } } - + private function _validate($note = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Orgform.php b/application/controllers/api/v1/codex/Orgform.php index d41214275..ad5d94185 100644 --- a/application/controllers/api/v1/codex/Orgform.php +++ b/application/controllers/api/v1/codex/Orgform.php @@ -21,7 +21,7 @@ class Orgform extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Orgform' => 'basis/orgform:rw', 'All' => 'basis/orgform:r', 'OrgformLV' => 'basis/orgform:r')); // Load model OrgformModel $this->load->model('codex/orgform_model', 'OrgformModel'); } @@ -32,11 +32,11 @@ class Orgform extends APIv1_Controller public function getOrgform() { $orgform_kurzbz = $this->get('orgform_kurzbz'); - + if (isset($orgform_kurzbz)) { $result = $this->OrgformModel->load($orgform_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -44,24 +44,24 @@ class Orgform extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function getAll() { $result = $this->OrgformModel->load(); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getOrgformLV() { $result = $this->OrgformModel->getOrgformLV(); - + $this->response($result, REST_Controller::HTTP_OK); } @@ -80,7 +80,7 @@ class Orgform extends APIv1_Controller { $result = $this->OrgformModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -88,9 +88,9 @@ class Orgform extends APIv1_Controller $this->response(); } } - + private function _validate($orgform = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Verwendung.php b/application/controllers/api/v1/codex/Verwendung.php index 21b2182db..9823d3915 100644 --- a/application/controllers/api/v1/codex/Verwendung.php +++ b/application/controllers/api/v1/codex/Verwendung.php @@ -21,7 +21,7 @@ class Verwendung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Verwendung' => 'basis/verwendung:rw')); // Load model VerwendungModel $this->load->model('codex/verwendung_model', 'VerwendungModel'); } @@ -32,11 +32,11 @@ class Verwendung extends APIv1_Controller public function getVerwendung() { $verwendung_code = $this->get('verwendung_code'); - + if (isset($verwendung_code)) { $result = $this->VerwendungModel->load($verwendung_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Verwendung extends APIv1_Controller { $result = $this->VerwendungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Verwendung extends APIv1_Controller $this->response(); } } - + private function _validate($verwendung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zgv.php b/application/controllers/api/v1/codex/Zgv.php index b7992aab4..d042b2b56 100644 --- a/application/controllers/api/v1/codex/Zgv.php +++ b/application/controllers/api/v1/codex/Zgv.php @@ -21,7 +21,7 @@ class Zgv extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zgv' => 'basis/zgv:rw')); // Load model ZgvModel $this->load->model('codex/zgv_model', 'ZgvModel'); } @@ -32,11 +32,11 @@ class Zgv extends APIv1_Controller public function getZgv() { $zgv_code = $this->get('zgv_code'); - + if (isset($zgv_code)) { $result = $this->ZgvModel->load($zgv_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zgv extends APIv1_Controller { $result = $this->ZgvModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zgv extends APIv1_Controller $this->response(); } } - + private function _validate($zgv = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zgvdoktor.php b/application/controllers/api/v1/codex/Zgvdoktor.php index 50ca5cacb..aeaf56463 100644 --- a/application/controllers/api/v1/codex/Zgvdoktor.php +++ b/application/controllers/api/v1/codex/Zgvdoktor.php @@ -21,7 +21,7 @@ class Zgvdoktor extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zgvdoktor' => 'basis/zgvdoktor:rw')); // Load model ZgvdoktorModel $this->load->model('codex/zgvdoktor_model', 'ZgvdoktorModel'); } @@ -32,11 +32,11 @@ class Zgvdoktor extends APIv1_Controller public function getZgvdoktor() { $zgvdoktor_code = $this->get('zgvdoktor_code'); - + if (isset($zgvdoktor_code)) { $result = $this->ZgvdoktorModel->load($zgvdoktor_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zgvdoktor extends APIv1_Controller { $result = $this->ZgvdoktorModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zgvdoktor extends APIv1_Controller $this->response(); } } - + private function _validate($zgvdoktor = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zgvgruppe.php b/application/controllers/api/v1/codex/Zgvgruppe.php index 805dbdb30..38b1fe520 100644 --- a/application/controllers/api/v1/codex/Zgvgruppe.php +++ b/application/controllers/api/v1/codex/Zgvgruppe.php @@ -21,7 +21,7 @@ class Zgvgruppe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zgvgruppe' => 'basis/zgvgruppe:rw')); // Load model ZgvgruppeModel $this->load->model('codex/zgvgruppe_model', 'ZgvgruppeModel'); } @@ -32,11 +32,11 @@ class Zgvgruppe extends APIv1_Controller public function getZgvgruppe() { $gruppe_kurzbz = $this->get('gruppe_kurzbz'); - + if (isset($gruppe_kurzbz)) { $result = $this->ZgvgruppeModel->load($gruppe_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zgvgruppe extends APIv1_Controller { $result = $this->ZgvgruppeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zgvgruppe extends APIv1_Controller $this->response(); } } - + private function _validate($zgvgruppe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zgvmaster.php b/application/controllers/api/v1/codex/Zgvmaster.php index e813073c1..b8e7ee86d 100644 --- a/application/controllers/api/v1/codex/Zgvmaster.php +++ b/application/controllers/api/v1/codex/Zgvmaster.php @@ -21,7 +21,7 @@ class Zgvmaster extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zgvmaster' => 'basis/zgvmaster:rw')); // Load model ZgvmasterModel $this->load->model('codex/zgvmaster_model', 'ZgvmasterModel'); } @@ -32,11 +32,11 @@ class Zgvmaster extends APIv1_Controller public function getZgvmaster() { $zgvmas_code = $this->get('zgvmas_code'); - + if (isset($zgvmas_code)) { $result = $this->ZgvmasterModel->load($zgvmas_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zgvmaster extends APIv1_Controller { $result = $this->ZgvmasterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zgvmaster extends APIv1_Controller $this->response(); } } - + private function _validate($zgvmaster = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zweck.php b/application/controllers/api/v1/codex/Zweck.php index 7e0c3f70a..c5710c7a5 100644 --- a/application/controllers/api/v1/codex/Zweck.php +++ b/application/controllers/api/v1/codex/Zweck.php @@ -21,7 +21,7 @@ class Zweck extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zweck' => 'basis/zweck:rw')); // Load model ZweckModel $this->load->model('codex/zweck_model', 'ZweckModel'); } @@ -32,11 +32,11 @@ class Zweck extends APIv1_Controller public function getZweck() { $zweck_code = $this->get('zweck_code'); - + if (isset($zweck_code)) { $result = $this->ZweckModel->load($zweck_code); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zweck extends APIv1_Controller { $result = $this->ZweckModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zweck extends APIv1_Controller $this->response(); } } - + private function _validate($zweck = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Ampel.php b/application/controllers/api/v1/content/Ampel.php index 1bf6aae9c..f550eafdd 100644 --- a/application/controllers/api/v1/content/Ampel.php +++ b/application/controllers/api/v1/content/Ampel.php @@ -21,7 +21,7 @@ class Ampel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ampel' => 'basis/ampel:rw')); // Load model AmpelModel $this->load->model('content/ampel_model', 'AmpelModel'); } @@ -32,11 +32,11 @@ class Ampel extends APIv1_Controller public function getAmpel() { $ampelID = $this->get('ampel_id'); - + if (isset($ampelID)) { $result = $this->AmpelModel->load($ampelID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Ampel extends APIv1_Controller { $result = $this->AmpelModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Ampel extends APIv1_Controller $this->response(); } } - + private function _validate($ampel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Content.php b/application/controllers/api/v1/content/Content.php index 2fd638e24..5d0854c2e 100644 --- a/application/controllers/api/v1/content/Content.php +++ b/application/controllers/api/v1/content/Content.php @@ -21,7 +21,7 @@ class Content extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Content' => 'basis/content:rw')); // Load model ContentModel $this->load->model('content/content_model', 'ContentModel'); } @@ -32,11 +32,11 @@ class Content extends APIv1_Controller public function getContent() { $contentID = $this->get('content_id'); - + if (isset($contentID)) { $result = $this->ContentModel->load($contentID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Content extends APIv1_Controller { $result = $this->ContentModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Content extends APIv1_Controller $this->response(); } } - + private function _validate($content = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Contentchild.php b/application/controllers/api/v1/content/Contentchild.php index 5f1a28917..95dbc4ab0 100644 --- a/application/controllers/api/v1/content/Contentchild.php +++ b/application/controllers/api/v1/content/Contentchild.php @@ -21,7 +21,7 @@ class Contentchild extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Contentchild' => 'basis/contentchild:rw')); // Load model ContentchildModel $this->load->model('content/contentchild_model', 'ContentchildModel'); } @@ -32,11 +32,11 @@ class Contentchild extends APIv1_Controller public function getContentchild() { $contentchildID = $this->get('contentchild_id'); - + if (isset($contentchildID)) { $result = $this->ContentchildModel->load($contentchildID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Contentchild extends APIv1_Controller { $result = $this->ContentchildModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Contentchild extends APIv1_Controller $this->response(); } } - + private function _validate($contentchild = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Contentgruppe.php b/application/controllers/api/v1/content/Contentgruppe.php index 420dd51f5..794400dc1 100644 --- a/application/controllers/api/v1/content/Contentgruppe.php +++ b/application/controllers/api/v1/content/Contentgruppe.php @@ -21,7 +21,7 @@ class Contentgruppe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Contentgruppe' => 'basis/contentgruppe:rw')); // Load model ContentgruppeModel $this->load->model('content/contentgruppe_model', 'ContentgruppeModel'); } @@ -33,11 +33,11 @@ class Contentgruppe extends APIv1_Controller { $gruppe_kurzbz = $this->get('gruppe_kurzbz'); $content_id = $this->get('content_id'); - + if (isset($gruppe_kurzbz) && isset($content_id)) { $result = $this->ContentgruppeModel->load(array($gruppe_kurzbz, $content_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Contentgruppe extends APIv1_Controller { $result = $this->ContentgruppeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Contentgruppe extends APIv1_Controller $this->response(); } } - + private function _validate($contentgruppe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Contentlog.php b/application/controllers/api/v1/content/Contentlog.php index b5b3aba68..ef4738828 100644 --- a/application/controllers/api/v1/content/Contentlog.php +++ b/application/controllers/api/v1/content/Contentlog.php @@ -21,7 +21,7 @@ class Contentlog extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Contentlog' => 'basis/contentlog:rw')); // Load model ContentlogModel $this->load->model('content/contentlog_model', 'ContentlogModel'); } @@ -32,11 +32,11 @@ class Contentlog extends APIv1_Controller public function getContentlog() { $contentlogID = $this->get('contentlog_id'); - + if (isset($contentlogID)) { $result = $this->ContentlogModel->load($contentlogID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Contentlog extends APIv1_Controller { $result = $this->ContentlogModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Contentlog extends APIv1_Controller $this->response(); } } - + private function _validate($contentlog = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Contentsprache.php b/application/controllers/api/v1/content/Contentsprache.php index 78c67c6c3..f3696d2ad 100644 --- a/application/controllers/api/v1/content/Contentsprache.php +++ b/application/controllers/api/v1/content/Contentsprache.php @@ -21,7 +21,7 @@ class Contentsprache extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Contentsprache' => 'basis/contentsprache:rw')); // Load model ContentspracheModel $this->load->model('content/contentsprache_model', 'ContentspracheModel'); } @@ -32,11 +32,11 @@ class Contentsprache extends APIv1_Controller public function getContentsprache() { $contentspracheID = $this->get('contentsprache_id'); - + if (isset($contentspracheID)) { $result = $this->ContentspracheModel->load($contentspracheID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Contentsprache extends APIv1_Controller { $result = $this->ContentspracheModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Contentsprache extends APIv1_Controller $this->response(); } } - + private function _validate($contentsprache = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Dms.php b/application/controllers/api/v1/content/Dms.php index dd1156273..e73254888 100644 --- a/application/controllers/api/v1/content/Dms.php +++ b/application/controllers/api/v1/content/Dms.php @@ -17,27 +17,27 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); class Dms extends APIv1_Controller { /** - * + * */ public function __construct() { - parent::__construct(); + parent::__construct(array('Dms' => 'basis/dms:rw', 'AktenAcceptedDms' => 'basis/dms:r', 'DelDms' => 'basis/dms:w')); // Load library DmsLib $this->load->library('DmsLib'); } - + /** - * + * */ public function getDms() { $dms_id = $this->get('dms_id'); $version = $this->get('version'); - + if (isset($dms_id)) { $result = $this->dmslib->read($dms_id, $version); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -45,20 +45,20 @@ class Dms extends APIv1_Controller $this->response(); } } - + /** - * + * */ public function getAktenAcceptedDms() { $person_id = $this->get('person_id'); $dokument_kurzbz = $this->get('dokument_kurzbz'); $no_file = $this->get('no_file'); - + if (isset($person_id)) { $result = $this->dmslib->getAktenAcceptedDms($person_id, $dokument_kurzbz, $no_file); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -66,18 +66,18 @@ class Dms extends APIv1_Controller $this->response(); } } - + /** - * + * */ public function postDms() { $dms = $this->post(); - + if ($this->_validatePost($dms)) { $result = $this->dmslib->save($dms); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -85,18 +85,18 @@ class Dms extends APIv1_Controller $this->response(); } } - + /** - * + * */ public function postDelDms() { $dms = $this->post(); - + if ($this->_validateDelete($this->post())) { $result = $this->dmslib->delete($dms['person_id'], $dms['dms_id']); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -104,7 +104,7 @@ class Dms extends APIv1_Controller $this->response(); } } - + private function _validatePost($dms = null) { if (!isset($dms)) @@ -119,10 +119,10 @@ class Dms extends APIv1_Controller { return false; } - + return true; } - + private function _validateDelete($dms = null) { if (!isset($dms)) @@ -137,7 +137,7 @@ class Dms extends APIv1_Controller { return false; } - + return true; } } diff --git a/application/controllers/api/v1/content/Infoscreen.php b/application/controllers/api/v1/content/Infoscreen.php index e7dc12d81..3012af304 100644 --- a/application/controllers/api/v1/content/Infoscreen.php +++ b/application/controllers/api/v1/content/Infoscreen.php @@ -21,7 +21,7 @@ class Infoscreen extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Infoscreen' => 'basis/infoscreen:rw')); // Load model InfoscreenModel $this->load->model('content/infoscreen_model', 'InfoscreenModel'); } @@ -32,11 +32,11 @@ class Infoscreen extends APIv1_Controller public function getInfoscreen() { $infoscreenID = $this->get('infoscreen_id'); - + if (isset($infoscreenID)) { $result = $this->InfoscreenModel->load($infoscreenID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Infoscreen extends APIv1_Controller { $result = $this->InfoscreenModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Infoscreen extends APIv1_Controller $this->response(); } } - + private function _validate($infoscreen = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/News.php b/application/controllers/api/v1/content/News.php index f8dd80008..b085afb7d 100644 --- a/application/controllers/api/v1/content/News.php +++ b/application/controllers/api/v1/content/News.php @@ -21,7 +21,7 @@ class News extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('News' => 'basis/news:rw')); // Load model NewsModel $this->load->model('content/news_model', 'NewsModel'); } @@ -32,11 +32,11 @@ class News extends APIv1_Controller public function getNews() { $newsID = $this->get('news_id'); - + if (isset($newsID)) { $result = $this->NewsModel->load($newsID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class News extends APIv1_Controller { $result = $this->NewsModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class News extends APIv1_Controller $this->response(); } } - + private function _validate($news = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Template.php b/application/controllers/api/v1/content/Template.php index 41a54af72..e15156b14 100644 --- a/application/controllers/api/v1/content/Template.php +++ b/application/controllers/api/v1/content/Template.php @@ -21,7 +21,7 @@ class Template extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Template' => 'basis/template:rw')); // Load model TemplateModel $this->load->model('content/template_model', 'TemplateModel'); } @@ -32,11 +32,11 @@ class Template extends APIv1_Controller public function getTemplate() { $template_kurzbz = $this->get('template_kurzbz'); - + if (isset($template_kurzbz)) { $result = $this->TemplateModel->load($template_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Template extends APIv1_Controller { $result = $this->TemplateModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Template extends APIv1_Controller $this->response(); } } - + private function _validate($template = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Veranstaltung.php b/application/controllers/api/v1/content/Veranstaltung.php index c21febf8d..5f922e65a 100644 --- a/application/controllers/api/v1/content/Veranstaltung.php +++ b/application/controllers/api/v1/content/Veranstaltung.php @@ -21,7 +21,7 @@ class Veranstaltung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Veranstaltung' => 'basis/veranstaltung:rw')); // Load model VeranstaltungModel $this->load->model('content/veranstaltung_model', 'VeranstaltungModel'); } @@ -32,11 +32,11 @@ class Veranstaltung extends APIv1_Controller public function getVeranstaltung() { $veranstaltungID = $this->get('veranstaltung_id'); - + if (isset($veranstaltungID)) { $result = $this->VeranstaltungModel->load($veranstaltungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Veranstaltung extends APIv1_Controller { $result = $this->VeranstaltungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Veranstaltung extends APIv1_Controller $this->response(); } } - + private function _validate($veranstaltung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/content/Veranstaltungskategorie.php b/application/controllers/api/v1/content/Veranstaltungskategorie.php index dd867b4db..20af408c5 100644 --- a/application/controllers/api/v1/content/Veranstaltungskategorie.php +++ b/application/controllers/api/v1/content/Veranstaltungskategorie.php @@ -21,7 +21,7 @@ class Veranstaltungskategorie extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Veranstaltungskategorie' => 'basis/veranstaltungskategorie:rw')); // Load model VeranstaltungskategorieModel $this->load->model('content/veranstaltungskategorie_model', 'VeranstaltungskategorieModel'); } @@ -32,11 +32,11 @@ class Veranstaltungskategorie extends APIv1_Controller public function getVeranstaltungskategorie() { $veranstaltungskategorie_kurzbz = $this->get('veranstaltungskategorie_kurzbz'); - + if (isset($veranstaltungskategorie_kurzbz)) { $result = $this->VeranstaltungskategorieModel->load($veranstaltungskategorie_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Veranstaltungskategorie extends APIv1_Controller { $result = $this->VeranstaltungskategorieModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Veranstaltungskategorie extends APIv1_Controller $this->response(); } } - + private function _validate($veranstaltungskategorie = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Akte.php b/application/controllers/api/v1/crm/Akte.php index 20b5ac22f..e9c892da5 100644 --- a/application/controllers/api/v1/crm/Akte.php +++ b/application/controllers/api/v1/crm/Akte.php @@ -21,11 +21,11 @@ class Akte extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Akte' => 'basis/akte:rw', 'Akten' => 'basis/akte:r', 'AktenAccepted' => 'basis/akte:r')); // Load model AkteModel $this->load->model('crm/akte_model', 'AkteModel'); - - + + } /** @@ -34,11 +34,11 @@ class Akte extends APIv1_Controller public function getAkte() { $akteID = $this->get('akte_id'); - + if (isset($akteID)) { $result = $this->AkteModel->load($akteID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -46,7 +46,7 @@ class Akte extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -56,11 +56,11 @@ class Akte extends APIv1_Controller $dokument_kurzbz = $this->get('dokument_kurzbz'); $stg_kz = $this->get('stg_kz'); $prestudent_id = $this->get('prestudent_id'); - + if (isset($person_id)) { $result = $this->AkteModel->getAkten($person_id, $dokument_kurzbz, $stg_kz, $prestudent_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,7 +68,7 @@ class Akte extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -76,11 +76,11 @@ class Akte extends APIv1_Controller { $person_id = $this->get('person_id'); $dokument_kurzbz = $this->get('dokument_kurzbz'); - + if (isset($person_id)) { $result = $this->AkteModel->getAktenAccepted($person_id, $dokument_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -104,7 +104,7 @@ class Akte extends APIv1_Controller { $result = $this->AkteModel->insert($akte); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -112,11 +112,11 @@ class Akte extends APIv1_Controller $this->response(); } } - + private function _validate($akte = null) { unset($akte['accepted']); - + return $akte; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Aufnahmeschluessel.php b/application/controllers/api/v1/crm/Aufnahmeschluessel.php index a746e2bdf..f2724481c 100644 --- a/application/controllers/api/v1/crm/Aufnahmeschluessel.php +++ b/application/controllers/api/v1/crm/Aufnahmeschluessel.php @@ -21,11 +21,11 @@ class Aufnahmeschluessel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aufnahmeschluessel' => 'basis/aufnahmeschluessel:rw')); // Load model AufnahmeschluesselModel $this->load->model('crm/aufnahmeschluessel_model', 'AufnahmeschluesselModel'); - - + + } /** @@ -34,11 +34,11 @@ class Aufnahmeschluessel extends APIv1_Controller public function getAufnahmeschluessel() { $aufnahmeschluessel = $this->get('aufnahmeschluessel'); - + if (isset($aufnahmeschluessel)) { $result = $this->AufnahmeschluesselModel->load($aufnahmeschluessel); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Aufnahmeschluessel extends APIv1_Controller { $result = $this->AufnahmeschluesselModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Aufnahmeschluessel extends APIv1_Controller $this->response(); } } - + private function _validate($aufnahmeschluessel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Aufnahmetermin.php b/application/controllers/api/v1/crm/Aufnahmetermin.php index 798eac728..e199adbf8 100644 --- a/application/controllers/api/v1/crm/Aufnahmetermin.php +++ b/application/controllers/api/v1/crm/Aufnahmetermin.php @@ -21,11 +21,11 @@ class Aufnahmetermin extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aufnahmetermin' => 'basis/aufnahmetermin:rw')); // Load model AufnahmeterminModel $this->load->model('crm/aufnahmetermin_model', 'AufnahmeterminModel'); - - + + } /** @@ -34,11 +34,11 @@ class Aufnahmetermin extends APIv1_Controller public function getAufnahmetermin() { $aufnahmeterminID = $this->get('aufnahmetermin_id'); - + if (isset($aufnahmeterminID)) { $result = $this->AufnahmeterminModel->load($aufnahmeterminID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Aufnahmetermin extends APIv1_Controller { $result = $this->AufnahmeterminModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Aufnahmetermin extends APIv1_Controller $this->response(); } } - + private function _validate($aufnahmetermin = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Aufnahmetermintyp.php b/application/controllers/api/v1/crm/Aufnahmetermintyp.php index dab29d678..7219598bf 100644 --- a/application/controllers/api/v1/crm/Aufnahmetermintyp.php +++ b/application/controllers/api/v1/crm/Aufnahmetermintyp.php @@ -21,11 +21,11 @@ class Aufnahmetermintyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aufnahmetermintyp' => 'basis/aufnahmetermintyp:rw')); // Load model AufnahmetermintypModel $this->load->model('crm/aufnahmetermintyp_model', 'AufnahmetermintypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Aufnahmetermintyp extends APIv1_Controller public function getAufnahmetermintyp() { $aufnahmetermintyp_kurzbz = $this->get('aufnahmetermintyp_kurzbz'); - + if (isset($aufnahmetermintyp_kurzbz)) { $result = $this->AufnahmetermintypModel->load($aufnahmetermintyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Aufnahmetermintyp extends APIv1_Controller { $result = $this->AufnahmetermintypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Aufnahmetermintyp extends APIv1_Controller $this->response(); } } - + private function _validate($aufnahmetermintyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Bewerbungstermine.php b/application/controllers/api/v1/crm/Bewerbungstermine.php index 7fecceae3..8d3c8b774 100644 --- a/application/controllers/api/v1/crm/Bewerbungstermine.php +++ b/application/controllers/api/v1/crm/Bewerbungstermine.php @@ -21,7 +21,14 @@ class Bewerbungstermine extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Bewerbungstermine' => 'basis/bewerbungstermine:rw', + 'ByStudiengangStudiensemester' => 'basis/bewerbungstermine:r', + 'ByStudienplan' => 'basis/bewerbungstermine:r', + 'Current' => 'basis/bewerbungstermine:r' + ) + ); // Load model BewerbungstermineModel $this->load->model('crm/bewerbungstermine_model', 'BewerbungstermineModel'); @@ -132,4 +139,4 @@ class Bewerbungstermine extends APIv1_Controller { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Buchungstyp.php b/application/controllers/api/v1/crm/Buchungstyp.php index bb3fa3e6b..a5bf44dfc 100644 --- a/application/controllers/api/v1/crm/Buchungstyp.php +++ b/application/controllers/api/v1/crm/Buchungstyp.php @@ -21,11 +21,11 @@ class Buchungstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Buchungstyp' => 'basis/buchungstyp:rw'); // Load model BuchungstypModel $this->load->model('crm/buchungstyp_model', 'BuchungstypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Buchungstyp extends APIv1_Controller public function getBuchungstyp() { $buchungstyp_kurzbz = $this->get('buchungstyp_kurzbz'); - + if (isset($buchungstyp_kurzbz)) { $result = $this->BuchungstypModel->load($buchungstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Buchungstyp extends APIv1_Controller { $result = $this->BuchungstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Buchungstyp extends APIv1_Controller $this->response(); } } - + private function _validate($buchungstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Dokument.php b/application/controllers/api/v1/crm/Dokument.php index 21c364cb6..11a603496 100644 --- a/application/controllers/api/v1/crm/Dokument.php +++ b/application/controllers/api/v1/crm/Dokument.php @@ -21,7 +21,7 @@ class Dokument extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Dokument' => 'basis/dokument:rw')); // Load model DokumentModel $this->load->model('crm/dokument_model', 'DokumentModel'); } @@ -32,11 +32,11 @@ class Dokument extends APIv1_Controller public function getDokument() { $dokument_kurzbz = $this->get('dokument_kurzbz'); - + if (isset($dokument_kurzbz)) { $result = $this->DokumentModel->load($dokument_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Dokument extends APIv1_Controller { $result = $this->DokumentModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Dokument extends APIv1_Controller $this->response(); } } - + private function _validate($dokument = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php index 9b7977ab0..020a876cd 100644 --- a/application/controllers/api/v1/crm/Dokumentprestudent.php +++ b/application/controllers/api/v1/crm/Dokumentprestudent.php @@ -21,7 +21,13 @@ class Dokumentprestudent extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Dokumentprestudent' => 'basis/dokumentprestudent:rw', + 'SetAccepted' => 'basis/dokumentprestudent:w', + 'SetAcceptedDocuments' => 'basis/dokumentprestudent:w' + ) + ); // Load model DokumentprestudentModel $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); } @@ -33,11 +39,11 @@ class Dokumentprestudent extends APIv1_Controller { $prestudent_id = $this->get('prestudent_id'); $dokument_kurzbz = $this->get('dokument_kurzbz'); - + if (isset($prestudent_id) && isset($dokument_kurzbz)) { $result = $this->DokumentprestudentModel->load(array($prestudent_id, $dokument_kurzbz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +67,7 @@ class Dokumentprestudent extends APIv1_Controller { $result = $this->DokumentprestudentModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,7 +75,7 @@ class Dokumentprestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -78,7 +84,7 @@ class Dokumentprestudent extends APIv1_Controller if (isset($this->post()['prestudent_id']) && isset($this->post()['studiengang_kz'])) { $result = $this->DokumentprestudentModel->setAccepted($this->post()['prestudent_id'], $this->post()['studiengang_kz']); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -86,7 +92,7 @@ class Dokumentprestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -95,7 +101,7 @@ class Dokumentprestudent extends APIv1_Controller if (isset($this->post()['prestudent_id']) && is_array($this->post()['dokument_kurzbz'])) { $result = $this->DokumentprestudentModel->setAcceptedDocuments($this->post()['prestudent_id'], $this->post()['dokument_kurzbz']); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -103,9 +109,9 @@ class Dokumentprestudent extends APIv1_Controller $this->response(); } } - + private function _validate($dokumentprestudent = null) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Dokumentstudiengang.php b/application/controllers/api/v1/crm/Dokumentstudiengang.php index 09989198b..3e908d455 100644 --- a/application/controllers/api/v1/crm/Dokumentstudiengang.php +++ b/application/controllers/api/v1/crm/Dokumentstudiengang.php @@ -21,7 +21,12 @@ class Dokumentstudiengang extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Dokumentstudiengang' => 'basis/dokumentstudiengang:rw', + 'DokumentstudiengangByStudiengang_kz' => 'basis/dokumentstudiengang:r' + ) + ); // Load model DokumentstudiengangModel $this->load->model('crm/Dokumentstudiengang_model', 'DokumentstudiengangModel'); } @@ -33,11 +38,11 @@ class Dokumentstudiengang extends APIv1_Controller { $studiengang_kz = $this->get('studiengang_kz'); $dokument_kurzbz = $this->get('dokument_kurzbz'); - + if (isset($studiengang_kz) && isset($dokument_kurzbz)) { $result = $this->DokumentstudiengangModel->load(array($studiengang_kz, $dokument_kurzbz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -45,7 +50,7 @@ class Dokumentstudiengang extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -55,7 +60,7 @@ class Dokumentstudiengang extends APIv1_Controller $onlinebewerbung = $this->get('onlinebewerbung'); $pflicht = $this->get('pflicht'); $nachreichbar = $this->get('nachreichbar'); - + if (isset($studiengang_kz)) { $result = $this->DokumentstudiengangModel->getDokumentstudiengangByStudiengang_kz( @@ -64,7 +69,7 @@ class Dokumentstudiengang extends APIv1_Controller $pflicht, $nachreichbar ); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -92,7 +97,7 @@ class Dokumentstudiengang extends APIv1_Controller { $result = $this->DokumentstudiengangModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -100,9 +105,9 @@ class Dokumentstudiengang extends APIv1_Controller $this->response(); } } - + private function _validate($dokumentstudiengang = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Konto.php b/application/controllers/api/v1/crm/Konto.php index cbff97753..5a2cdafe2 100644 --- a/application/controllers/api/v1/crm/Konto.php +++ b/application/controllers/api/v1/crm/Konto.php @@ -21,11 +21,11 @@ class Konto extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Konto' => 'basis/konto:rw')); // Load model KontoModel $this->load->model('crm/konto_model', 'KontoModel'); - - + + } /** @@ -34,11 +34,11 @@ class Konto extends APIv1_Controller public function getKonto() { $buchungsnr = $this->get('buchungsnr'); - + if (isset($buchungsnr)) { $result = $this->KontoModel->load($buchungsnr); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Konto extends APIv1_Controller { $result = $this->KontoModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Konto extends APIv1_Controller $this->response(); } } - + private function _validate($konto = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Preincoming.php b/application/controllers/api/v1/crm/Preincoming.php index 42f305a57..14da2b9c3 100644 --- a/application/controllers/api/v1/crm/Preincoming.php +++ b/application/controllers/api/v1/crm/Preincoming.php @@ -21,11 +21,11 @@ class Preincoming extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Preincoming' => 'basis/preincoming:rw')); // Load model PreincomingModel $this->load->model('crm/preincoming_model', 'PreincomingModel'); - - + + } /** @@ -34,11 +34,11 @@ class Preincoming extends APIv1_Controller public function getPreincoming() { $preincomingID = $this->get('preincoming_id'); - + if (isset($preincomingID)) { $result = $this->PreincomingModel->load($preincomingID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Preincoming extends APIv1_Controller { $result = $this->PreincomingModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Preincoming extends APIv1_Controller $this->response(); } } - + private function _validate($preincoming = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Preinteressent.php b/application/controllers/api/v1/crm/Preinteressent.php index 39f897df3..62c29dfda 100644 --- a/application/controllers/api/v1/crm/Preinteressent.php +++ b/application/controllers/api/v1/crm/Preinteressent.php @@ -21,11 +21,11 @@ class Preinteressent extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Preinteressent' => 'basis/preinteressent:rw', 'PreinteressentByPersonID' => 'basis/preinteressent:r')); // Load model PersonModel $this->load->model('crm/preinteressent_model', 'PreinteressentModel'); - - + + } /** @@ -34,11 +34,11 @@ class Preinteressent extends APIv1_Controller public function getPreinteressent() { $preinteressent_id = $this->get('preinteressent_id'); - + if (isset($preinteressent_id)) { $result = $this->PreinteressentModel->load($preinteressent_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -46,18 +46,18 @@ class Preinteressent extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function getPreinteressentByPersonID() { $person_id = $this->get('person_id'); - + if (isset($person_id)) { $result = $this->PreinteressentModel->load(array('person_id' => $person_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -81,7 +81,7 @@ class Preinteressent extends APIv1_Controller { $result = $this->PreinteressentModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -89,7 +89,7 @@ class Preinteressent extends APIv1_Controller $this->response(); } } - + private function _validate($preinteressent) { if ($preinteressent['person_id'] == '') @@ -97,13 +97,13 @@ class Preinteressent extends APIv1_Controller //$this->errormsg = 'Person_id muss angegeben werden'; return false; } - + if ($preinteressent['aufmerksamdurch_kurzbz'] == '') { //$this->errormsg = 'Aufmerksamdurch muss angegeben werden'; return false; } - + return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Preinteressentstudiengang.php b/application/controllers/api/v1/crm/Preinteressentstudiengang.php index b4de9b3ab..e4e834ef9 100644 --- a/application/controllers/api/v1/crm/Preinteressentstudiengang.php +++ b/application/controllers/api/v1/crm/Preinteressentstudiengang.php @@ -21,11 +21,11 @@ class Preinteressentstudiengang extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Preinteressentstudiengang' => 'basis/preinteressentstudiengang:rw')); // Load model PreinteressentstudiengangModel $this->load->model('crm/preinteressentstudiengang_model', 'PreinteressentstudiengangModel'); - - + + } /** @@ -35,11 +35,11 @@ class Preinteressentstudiengang extends APIv1_Controller { $preinteressent_id = $this->get('preinteressent_id'); $studiengang_kz = $this->get('studiengang_kz'); - + if (isset($preinteressent_id) && isset($studiengang_kz)) { $result = $this->PreinteressentstudiengangModel->load(array($preinteressent_id, $studiengang_kz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Preinteressentstudiengang extends APIv1_Controller { $result = $this->PreinteressentstudiengangModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Preinteressentstudiengang extends APIv1_Controller $this->response(); } } - + private function _validate($preinteressentstudiengang = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Preoutgoing.php b/application/controllers/api/v1/crm/Preoutgoing.php index 821befb91..733bd2eb9 100644 --- a/application/controllers/api/v1/crm/Preoutgoing.php +++ b/application/controllers/api/v1/crm/Preoutgoing.php @@ -21,11 +21,11 @@ class Preoutgoing extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Preoutgoing' => 'basis/preoutgoing:rw')); // Load model PreoutgoingModel $this->load->model('crm/preoutgoing_model', 'PreoutgoingModel'); - - + + } /** @@ -34,11 +34,11 @@ class Preoutgoing extends APIv1_Controller public function getPreoutgoing() { $preoutgoingID = $this->get('preoutgoing_id'); - + if (isset($preoutgoingID)) { $result = $this->PreoutgoingModel->load($preoutgoingID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Preoutgoing extends APIv1_Controller { $result = $this->PreoutgoingModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Preoutgoing extends APIv1_Controller $this->response(); } } - + private function _validate($preoutgoing = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Prestudent.php b/application/controllers/api/v1/crm/Prestudent.php index 5d5ff063b..072ba3eea 100644 --- a/application/controllers/api/v1/crm/Prestudent.php +++ b/application/controllers/api/v1/crm/Prestudent.php @@ -21,7 +21,18 @@ class Prestudent extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Prestudent' => 'basis/prestudent:rw', + 'PrestudentByPersonID' => 'basis/prestudent:r', + 'Specialization' => 'basis/prestudent:rw', + 'LastStatuses' => 'basis/prestudent:r', + 'PrestudentsPerStatus' => 'basis/prestudent:r', + 'RmSpecialization' => 'basis/prestudent:w', + 'AddReihungstest' => 'basis/prestudent:w', + 'DelReihungstest' => 'basis/prestudent:w' + ) + ); // Load model PrestudentModel $this->load->model('crm/prestudent_model', 'PrestudentModel'); // Load library ReihungstestLib diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index 814bf0617..b72ac2fe9 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -21,7 +21,13 @@ class Prestudentstatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Prestudentstatus' => 'basis/prestudentstatus:rw', + 'LastStatus' => 'basis/prestudentstatus:r', + 'StatusByFilter' => 'basis/prestudentstatus:r' + ) + ); // Load model PrestudentstatusModel $this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel'); } diff --git a/application/controllers/api/v1/crm/Reihungstest.php b/application/controllers/api/v1/crm/Reihungstest.php index 9062105e7..e9012d740 100644 --- a/application/controllers/api/v1/crm/Reihungstest.php +++ b/application/controllers/api/v1/crm/Reihungstest.php @@ -21,7 +21,14 @@ class Reihungstest extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Reihungstest' => 'basis/reihungstest:rw', + 'ByStudiengangStudiensemester' => 'basis/reihungstest:r', + 'ReihungstestByPersonID' => 'basis/reihungstest:r', + 'AvailableReihungstestByPersonId' => 'basis/reihungstest:r' + ) + ); // Load model ReihungstestModel $this->load->model('crm/Reihungstest_model', 'ReihungstestModel'); // Load library ReihungstestLib @@ -34,11 +41,11 @@ class Reihungstest extends APIv1_Controller public function getReihungstest() { $reihungstestID = $this->get('reihungstest_id'); - + if (isset($reihungstestID)) { $result = $this->ReihungstestModel->load($reihungstestID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -46,7 +53,7 @@ class Reihungstest extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -55,7 +62,7 @@ class Reihungstest extends APIv1_Controller $studiengang_kz = $this->get('studiengang_kz'); $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); $available = $this->get('available'); - + if (isset($studiengang_kz)) { $parametersArray = array('studiengang_kz' => $studiengang_kz); @@ -68,7 +75,7 @@ class Reihungstest extends APIv1_Controller $parametersArray['anmeldefrist >='] = 'NOW()'; } $result = $this->ReihungstestModel->loadWhere($parametersArray); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -76,7 +83,7 @@ class Reihungstest extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -84,11 +91,11 @@ class Reihungstest extends APIv1_Controller { $person_id = $this->get('person_id'); $available = $this->get('available'); - + if (isset($person_id)) { $result = $this->reihungstestlib->getReihungstestByPersonID($person_id, $available); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -96,20 +103,20 @@ class Reihungstest extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function getAvailableReihungstestByPersonId() { $person_id = $this->get('person_id'); - + if (isset($person_id)) { $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); - + $result = $this->StudiengangModel->getAvailableReihungstestByPersonId($person_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -133,7 +140,7 @@ class Reihungstest extends APIv1_Controller { $result = $this->ReihungstestModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -141,9 +148,9 @@ class Reihungstest extends APIv1_Controller $this->response(); } } - + private function _validate($reihungstest = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/RtPerson.php b/application/controllers/api/v1/crm/RtPerson.php index a7478ae5f..9f251052f 100644 --- a/application/controllers/api/v1/crm/RtPerson.php +++ b/application/controllers/api/v1/crm/RtPerson.php @@ -21,7 +21,7 @@ class RtPerson extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('RtPerson' => 'basis/rtperson:rw')); // Load model StatusModel $this->load->model("crm/RtPerson_model", "RtPersonModel"); } @@ -32,11 +32,11 @@ class RtPerson extends APIv1_Controller public function getRtPerson() { $rt_person_id = $this->get("rt_person_id"); - + if (isset($rt_person_id)) { $result = $this->RtPersonModel->load($rt_person_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class RtPerson extends APIv1_Controller { $result = $this->RtPersonModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class RtPerson extends APIv1_Controller $this->response(); } } - + private function _validate($rtPerson = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Status.php b/application/controllers/api/v1/crm/Status.php index 4eb1b1834..37a8fbd11 100644 --- a/application/controllers/api/v1/crm/Status.php +++ b/application/controllers/api/v1/crm/Status.php @@ -21,11 +21,11 @@ class Status extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Status' => 'basis/status:rw')); // Load model StatusModel $this->load->model('crm/status_model', 'StatusModel'); - - + + } /** @@ -34,11 +34,11 @@ class Status extends APIv1_Controller public function getStatus() { $status_kurzbz = $this->get('status_kurzbz'); - + if (isset($status_kurzbz)) { $result = $this->StatusModel->load($status_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Status extends APIv1_Controller { $result = $this->StatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Status extends APIv1_Controller $this->response(); } } - + private function _validate($status = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Statusgrund.php b/application/controllers/api/v1/crm/Statusgrund.php index 55241ed16..3f19f2f82 100644 --- a/application/controllers/api/v1/crm/Statusgrund.php +++ b/application/controllers/api/v1/crm/Statusgrund.php @@ -21,7 +21,7 @@ class Statusgrund extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Statusgrund' => 'basis/statusgrund:rw')); // Load model StatusModel $this->load->model('crm/Statusgrund_model', 'StatusgrundModel'); } @@ -32,11 +32,11 @@ class Statusgrund extends APIv1_Controller public function getStatusgrund() { $statusgrund_kurzbz = $this->get('statusgrund_kurzbz'); - + if (isset($statusgrund_kurzbz)) { $result = $this->StatusgrundModel->load($statusgrund_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Statusgrund extends APIv1_Controller { $result = $this->StatusgrundModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Statusgrund extends APIv1_Controller $this->response(); } } - + private function _validate($statusgrund = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Student.php b/application/controllers/api/v1/crm/Student.php index c95e4b16f..6227cb6e3 100644 --- a/application/controllers/api/v1/crm/Student.php +++ b/application/controllers/api/v1/crm/Student.php @@ -21,11 +21,11 @@ class Student extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Student' => 'basis/student:rw')); // Load model StudentModel $this->load->model('crm/student_model', 'StudentModel'); - - + + } /** @@ -34,11 +34,11 @@ class Student extends APIv1_Controller public function getStudent() { $studentID = $this->get('student_id'); - + if (isset($studentID)) { $result = $this->StudentModel->load($studentID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Student extends APIv1_Controller { $result = $this->StudentModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Student extends APIv1_Controller $this->response(); } } - + private function _validate($student = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Abgabe.php b/application/controllers/api/v1/education/Abgabe.php index 6215b43ed..e3fd64530 100644 --- a/application/controllers/api/v1/education/Abgabe.php +++ b/application/controllers/api/v1/education/Abgabe.php @@ -21,7 +21,7 @@ class Abgabe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Abgabe' => 'basis/abgabe:rw')); // Load model AbgabeModel $this->load->model('education/Abgabe_model', 'AbgabeModel'); } @@ -32,11 +32,11 @@ class Abgabe extends APIv1_Controller public function getAbgabe() { $abgabe_id = $this->get('abgabe_id'); - + if (isset($abgabe_id)) { $result = $this->AbgabeModel->load($abgabe_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Abgabe extends APIv1_Controller { $result = $this->AbgabeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Abgabe extends APIv1_Controller $this->response(); } } - + private function _validate($abgabe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Abschlussbeurteilung.php b/application/controllers/api/v1/education/Abschlussbeurteilung.php index 1ca830e41..1987e276f 100644 --- a/application/controllers/api/v1/education/Abschlussbeurteilung.php +++ b/application/controllers/api/v1/education/Abschlussbeurteilung.php @@ -21,7 +21,7 @@ class Abschlussbeurteilung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Abschlussbeurteilung' => 'basis/abschlussbeurteilung:rw')); // Load model AbschlussbeurteilungModel $this->load->model('education/Abschlussbeurteilung_model', 'AbschlussbeurteilungModel'); } @@ -32,11 +32,11 @@ class Abschlussbeurteilung extends APIv1_Controller public function getAbschlussbeurteilung() { $abschlussbeurteilung_kurzbz = $this->get('abschlussbeurteilung_kurzbz'); - + if (isset($abschlussbeurteilung_kurzbz)) { $result = $this->AbschlussbeurteilungModel->load($abschlussbeurteilung_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Abschlussbeurteilung extends APIv1_Controller { $result = $this->AbschlussbeurteilungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Abschlussbeurteilung extends APIv1_Controller $this->response(); } } - + private function _validate($abschlussbeurteilung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Abschlusspruefung.php b/application/controllers/api/v1/education/Abschlusspruefung.php index e46ce14e7..cadea53ca 100644 --- a/application/controllers/api/v1/education/Abschlusspruefung.php +++ b/application/controllers/api/v1/education/Abschlusspruefung.php @@ -21,7 +21,7 @@ class Abschlusspruefung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Abschlusspruefung' => 'basis/abschlusspruefung:rw')); // Load model AbschlusspruefungModel $this->load->model('education/Abschlusspruefung_model', 'AbschlusspruefungModel'); } @@ -32,11 +32,11 @@ class Abschlusspruefung extends APIv1_Controller public function getAbschlusspruefung() { $abschlusspruefung_id = $this->get('abschlusspruefung_id'); - + if (isset($abschlusspruefung_id)) { $result = $this->AbschlusspruefungModel->load($abschlusspruefung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Abschlusspruefung extends APIv1_Controller { $result = $this->AbschlusspruefungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Abschlusspruefung extends APIv1_Controller $this->response(); } } - + private function _validate($abschlusspruefung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Anrechnung.php b/application/controllers/api/v1/education/Anrechnung.php index abf469da8..5a99b08ab 100644 --- a/application/controllers/api/v1/education/Anrechnung.php +++ b/application/controllers/api/v1/education/Anrechnung.php @@ -21,7 +21,7 @@ class Anrechnung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Anrechnung' => 'basis/anrechnung:rw')); // Load model AnrechnungModel $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); } @@ -32,11 +32,11 @@ class Anrechnung extends APIv1_Controller public function getAnrechnung() { $anrechnung_id = $this->get('anrechnung_id'); - + if (isset($anrechnung_id)) { $result = $this->AnrechnungModel->load($anrechnung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Anrechnung extends APIv1_Controller { $result = $this->AnrechnungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Anrechnung extends APIv1_Controller $this->response(); } } - + private function _validate($anrechnung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Anwesenheit.php b/application/controllers/api/v1/education/Anwesenheit.php index e74101ee0..2e915f071 100644 --- a/application/controllers/api/v1/education/Anwesenheit.php +++ b/application/controllers/api/v1/education/Anwesenheit.php @@ -21,7 +21,7 @@ class Anwesenheit extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Anwesenheit' => 'basis/anwesenheit:rw')); // Load model AnwesenheitModel $this->load->model('education/Anwesenheit_model', 'AnwesenheitModel'); } @@ -32,11 +32,11 @@ class Anwesenheit extends APIv1_Controller public function getAnwesenheit() { $anwesenheit_id = $this->get('anwesenheit_id'); - + if (isset($anwesenheit_id)) { $result = $this->AnwesenheitModel->load($anwesenheit_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Anwesenheit extends APIv1_Controller { $result = $this->AnwesenheitModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Anwesenheit extends APIv1_Controller $this->response(); } } - + private function _validate($anwesenheit = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Beispiel.php b/application/controllers/api/v1/education/Beispiel.php index b0fecfea6..b2c06047b 100644 --- a/application/controllers/api/v1/education/Beispiel.php +++ b/application/controllers/api/v1/education/Beispiel.php @@ -21,7 +21,7 @@ class Beispiel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Beispiel' => 'basis/beispiel:rw')); // Load model BeispielModel $this->load->model('education/Beispiel_model', 'BeispielModel'); } @@ -32,11 +32,11 @@ class Beispiel extends APIv1_Controller public function getBeispiel() { $beispiel_id = $this->get('beispiel_id'); - + if (isset($beispiel_id)) { $result = $this->BeispielModel->load($beispiel_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Beispiel extends APIv1_Controller { $result = $this->BeispielModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Beispiel extends APIv1_Controller $this->response(); } } - + private function _validate($beispiel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Betreuerart.php b/application/controllers/api/v1/education/Betreuerart.php index a076bf5fd..43b4c51f6 100644 --- a/application/controllers/api/v1/education/Betreuerart.php +++ b/application/controllers/api/v1/education/Betreuerart.php @@ -21,7 +21,7 @@ class Betreuerart extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Betreuerart' => 'basis/betreuerart:rw')); // Load model BetreuerartModel $this->load->model('education/Betreuerart_model', 'BetreuerartModel'); } @@ -32,11 +32,11 @@ class Betreuerart extends APIv1_Controller public function getBetreuerart() { $betreuerart_id = $this->get('betreuerart_kurzbz'); - + if (isset($betreuerart_id)) { $result = $this->BetreuerartModel->load($betreuerart_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Betreuerart extends APIv1_Controller { $result = $this->BetreuerartModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Betreuerart extends APIv1_Controller $this->response(); } } - + private function _validate($betreuerart = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Feedback.php b/application/controllers/api/v1/education/Feedback.php index 0d205d3b0..abef22d77 100644 --- a/application/controllers/api/v1/education/Feedback.php +++ b/application/controllers/api/v1/education/Feedback.php @@ -21,7 +21,7 @@ class Feedback extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Feedback' => 'basis/feedback:rw')); // Load model FeedbackModel $this->load->model('education/Feedback_model', 'FeedbackModel'); } @@ -32,11 +32,11 @@ class Feedback extends APIv1_Controller public function getFeedback() { $feedback_id = $this->get('feedback_id'); - + if (isset($feedback_id)) { $result = $this->FeedbackModel->load($feedback_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Feedback extends APIv1_Controller { $result = $this->FeedbackModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Feedback extends APIv1_Controller $this->response(); } } - + private function _validate($feedback = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Legesamtnote.php b/application/controllers/api/v1/education/Legesamtnote.php index adc4af365..96ff25c4f 100644 --- a/application/controllers/api/v1/education/Legesamtnote.php +++ b/application/controllers/api/v1/education/Legesamtnote.php @@ -21,7 +21,7 @@ class Legesamtnote extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Legesamtnote' => 'basis/legesamtnote:rw')); // Load model LegesamtnoteModel $this->load->model('education/Legesamtnote_model', 'LegesamtnoteModel'); } @@ -33,11 +33,11 @@ class Legesamtnote extends APIv1_Controller { $lehreinheit_id = $this->get('lehreinheit_id'); $student_uid = $this->get('student_uid'); - + if (isset($lehreinheit_id) && isset($student_uid)) { $result = $this->LegesamtnoteModel->load(array($lehreinheit_id, $student_uid)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Legesamtnote extends APIv1_Controller { $result = $this->LegesamtnoteModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Legesamtnote extends APIv1_Controller $this->response(); } } - + private function _validate($legesamtnote = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehreinheit.php b/application/controllers/api/v1/education/Lehreinheit.php index 7fe1a8e44..f229de846 100644 --- a/application/controllers/api/v1/education/Lehreinheit.php +++ b/application/controllers/api/v1/education/Lehreinheit.php @@ -21,7 +21,7 @@ class Lehreinheit extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehreinheit' => 'basis/lehreinheit:rw')); // Load model LehreinheitModel $this->load->model('education/Lehreinheit_model', 'LehreinheitModel'); } @@ -32,11 +32,11 @@ class Lehreinheit extends APIv1_Controller public function getLehreinheit() { $lehreinheit_id = $this->get('lehreinheit_id'); - + if (isset($lehreinheit_id)) { $result = $this->LehreinheitModel->load($lehreinheit_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehreinheit extends APIv1_Controller { $result = $this->LehreinheitModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehreinheit extends APIv1_Controller $this->response(); } } - + private function _validate($lehreinheit = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehreinheitgruppe.php b/application/controllers/api/v1/education/Lehreinheitgruppe.php index cc2a41242..6ef949d3e 100644 --- a/application/controllers/api/v1/education/Lehreinheitgruppe.php +++ b/application/controllers/api/v1/education/Lehreinheitgruppe.php @@ -21,7 +21,7 @@ class Lehreinheitgruppe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehreinheitgruppe' => 'basis/lehreinheitgruppe:rw')); // Load model LehreinheitgruppeModel $this->load->model('education/Lehreinheitgruppe_model', 'LehreinheitgruppeModel'); } @@ -32,11 +32,11 @@ class Lehreinheitgruppe extends APIv1_Controller public function getLehreinheitgruppe() { $lehreinheitgruppe_id = $this->get('lehreinheitgruppe_id'); - + if (isset($lehreinheitgruppe_id)) { $result = $this->LehreinheitgruppeModel->load($lehreinheitgruppe_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehreinheitgruppe extends APIv1_Controller { $result = $this->LehreinheitgruppeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehreinheitgruppe extends APIv1_Controller $this->response(); } } - + private function _validate($lehreinheitgruppe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php index e3cd51018..5237ca849 100644 --- a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php +++ b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php @@ -21,7 +21,7 @@ class Lehreinheitmitarbeiter extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehreinheitmitarbeiter' => 'basis/lehreinheitmitarbeiter:rw')); // Load model LehreinheitmitarbeiterModel $this->load->model('education/Lehreinheitmitarbeiter_model', 'LehreinheitmitarbeiterModel'); } @@ -33,11 +33,11 @@ class Lehreinheitmitarbeiter extends APIv1_Controller { $mitarbeiter_uid = $this->get('mitarbeiter_uid'); $lehreinheit_id = $this->get('lehreinheit_id'); - + if (isset($mitarbeiter_uid) && isset($lehreinheit_id)) { $result = $this->LehreinheitmitarbeiterModel->load(array($mitarbeiter_uid, $lehreinheit_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Lehreinheitmitarbeiter extends APIv1_Controller { $result = $this->LehreinheitmitarbeiterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Lehreinheitmitarbeiter extends APIv1_Controller $this->response(); } } - + private function _validate($lehreinheitmitarbeiter = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehrfach.php b/application/controllers/api/v1/education/Lehrfach.php index 8fca6fc61..81ce519e1 100644 --- a/application/controllers/api/v1/education/Lehrfach.php +++ b/application/controllers/api/v1/education/Lehrfach.php @@ -21,7 +21,7 @@ class Lehrfach extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrfach' => 'basis/lehrfach:rw')); // Load model LehrfachModel $this->load->model('education/Lehrfach_model', 'LehrfachModel'); } @@ -32,11 +32,11 @@ class Lehrfach extends APIv1_Controller public function getLehrfach() { $lehrfach_id = $this->get('lehrfach_id'); - + if (isset($lehrfach_id)) { $result = $this->LehrfachModel->load($lehrfach_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehrfach extends APIv1_Controller { $result = $this->LehrfachModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehrfach extends APIv1_Controller $this->response(); } } - + private function _validate($lehrfach = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehrfunktion.php b/application/controllers/api/v1/education/Lehrfunktion.php index 227526d8a..e29f1227d 100644 --- a/application/controllers/api/v1/education/Lehrfunktion.php +++ b/application/controllers/api/v1/education/Lehrfunktion.php @@ -21,7 +21,7 @@ class Lehrfunktion extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrfunktion' => 'basis/lehrfunktion:rw')); // Load model LehrfunktionModel $this->load->model('education/Lehrfunktion_model', 'LehrfunktionModel'); } @@ -32,11 +32,11 @@ class Lehrfunktion extends APIv1_Controller public function getLehrfunktion() { $lehrfunktion_kurzbz = $this->get('lehrfunktion_kurzbz'); - + if (isset($lehrfunktion_kurzbz)) { $result = $this->LehrfunktionModel->load($lehrfunktion_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehrfunktion extends APIv1_Controller { $result = $this->LehrfunktionModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehrfunktion extends APIv1_Controller $this->response(); } } - + private function _validate($lehrfunktion = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehrtyp.php b/application/controllers/api/v1/education/Lehrtyp.php index 210f9ffc6..dfcfd3033 100644 --- a/application/controllers/api/v1/education/Lehrtyp.php +++ b/application/controllers/api/v1/education/Lehrtyp.php @@ -21,7 +21,7 @@ class Lehrtyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrtyp' => 'basis/lehrtyp:rw')); // Load model LehrtypModel $this->load->model('education/Lehrtyp_model', 'LehrtypModel'); } @@ -32,11 +32,11 @@ class Lehrtyp extends APIv1_Controller public function getLehrtyp() { $lehrtyp_kurzbz = $this->get('lehrtyp_kurzbz'); - + if (isset($lehrtyp_kurzbz)) { $result = $this->LehrtypModel->load($lehrtyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehrtyp extends APIv1_Controller { $result = $this->LehrtypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehrtyp extends APIv1_Controller $this->response(); } } - + private function _validate($lehrtyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lehrveranstaltung.php b/application/controllers/api/v1/education/Lehrveranstaltung.php index 6604600df..2e2fffb66 100644 --- a/application/controllers/api/v1/education/Lehrveranstaltung.php +++ b/application/controllers/api/v1/education/Lehrveranstaltung.php @@ -21,7 +21,7 @@ class Lehrveranstaltung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrveranstaltung' => 'basis/lehrveranstaltung:rw')); // Load model LehrveranstaltungModel $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); } @@ -32,11 +32,11 @@ class Lehrveranstaltung extends APIv1_Controller public function getLehrveranstaltung() { $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); - + if (isset($lehrveranstaltung_id)) { $result = $this->LehrveranstaltungModel->load($lehrveranstaltung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lehrveranstaltung extends APIv1_Controller { $result = $this->LehrveranstaltungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lehrveranstaltung extends APIv1_Controller $this->response(); } } - + private function _validate($lehrveranstaltung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lenotenschluessel.php b/application/controllers/api/v1/education/Lenotenschluessel.php index 235328ed7..9477172a3 100644 --- a/application/controllers/api/v1/education/Lenotenschluessel.php +++ b/application/controllers/api/v1/education/Lenotenschluessel.php @@ -21,11 +21,11 @@ class Lenotenschluessel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('LeNotenschluessel' => 'basis/lenotenschluessel:rw')); // Load model LeNotenschluesselModel $this->load->model('education/LeNotenschluessel_model', 'LeNotenschluesselModel'); - - + + } /** @@ -35,11 +35,11 @@ class Lenotenschluessel extends APIv1_Controller { $note = $this->get('note'); $lehreinheit_id = $this->get('lehreinheit_id'); - + if (isset($note) && isset($lehreinheit_id)) { $result = $this->LeNotenschluesselModel->load(array($note, $lehreinheit_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Lenotenschluessel extends APIv1_Controller { $result = $this->LeNotenschluesselModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Lenotenschluessel extends APIv1_Controller $this->response(); } } - + private function _validate($lenotenschluessel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lepruefung.php b/application/controllers/api/v1/education/Lepruefung.php index 283987d49..52e1d81b6 100644 --- a/application/controllers/api/v1/education/Lepruefung.php +++ b/application/controllers/api/v1/education/Lepruefung.php @@ -21,7 +21,7 @@ class Lepruefung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('LePruefung' => 'basis/lepruefung:rw')); // Load model LePruefungModel $this->load->model('education/LePruefung_model', 'LePruefungModel'); } @@ -32,11 +32,11 @@ class Lepruefung extends APIv1_Controller public function getLePruefung() { $lepruefung_id = $this->get('lepruefung_id'); - + if (isset($lepruefung_id)) { $result = $this->LePruefungModel->load($lepruefung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lepruefung extends APIv1_Controller { $result = $this->LePruefungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lepruefung extends APIv1_Controller $this->response(); } } - + private function _validate($lepruefung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lvangebot.php b/application/controllers/api/v1/education/Lvangebot.php index ec464abf3..ecd917233 100644 --- a/application/controllers/api/v1/education/Lvangebot.php +++ b/application/controllers/api/v1/education/Lvangebot.php @@ -21,7 +21,7 @@ class Lvangebot extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lvangebot' => 'basis/lvangebot:rw')); // Load model LvangebotModel $this->load->model('education/Lvangebot_model', 'LvangebotModel'); } @@ -32,11 +32,11 @@ class Lvangebot extends APIv1_Controller public function getLvangebot() { $lvangebot_id = $this->get('lvangebot_id'); - + if (isset($lvangebot_id)) { $result = $this->LvangebotModel->load($lvangebot_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lvangebot extends APIv1_Controller { $result = $this->LvangebotModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lvangebot extends APIv1_Controller $this->response(); } } - + private function _validate($lvangebot = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lvgesamtnote.php b/application/controllers/api/v1/education/Lvgesamtnote.php index a0813add8..464ef99a9 100644 --- a/application/controllers/api/v1/education/Lvgesamtnote.php +++ b/application/controllers/api/v1/education/Lvgesamtnote.php @@ -21,7 +21,7 @@ class Lvgesamtnote extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lvgesamtnote' => 'basis/lvgesamtnote:rw')); // Load model LvgesamtnoteModel $this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel'); } @@ -34,11 +34,11 @@ class Lvgesamtnote extends APIv1_Controller $student_uid = $this->get('student_uid'); $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); - + if (isset($student_uid) && isset($studiensemester_kurzbz) && isset($lehrveranstaltung_id)) { $result = $this->LvgesamtnoteModel->load(array($student_uid, $studiensemester_kurzbz, $lehrveranstaltung_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,14 +60,14 @@ class Lvgesamtnote extends APIv1_Controller $this->post()['studiensemester_kurzbz'], $this->post()['lehrveranstaltung_id'] ); - + $result = $this->LvgesamtnoteModel->update($pksArray, $this->post()); } else { $result = $this->LvgesamtnoteModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -75,9 +75,9 @@ class Lvgesamtnote extends APIv1_Controller $this->response(); } } - + private function _validate($lvgesamtnote = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lvinfo.php b/application/controllers/api/v1/education/Lvinfo.php index 0b7a3c827..8631583b9 100644 --- a/application/controllers/api/v1/education/Lvinfo.php +++ b/application/controllers/api/v1/education/Lvinfo.php @@ -21,7 +21,7 @@ class Lvinfo extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lvinfo' => 'basis/lvinfo:rw')); // Load model LvinfoModel $this->load->model('education/Lvinfo_model', 'LvinfoModel'); } @@ -33,11 +33,11 @@ class Lvinfo extends APIv1_Controller { $sprache = $this->get('sprache'); $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); - + if (isset($sprache) && isset($lehrveranstaltung_id)) { $result = $this->LvinfoModel->load(array($sprache, $lehrveranstaltung_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Lvinfo extends APIv1_Controller { $result = $this->LvinfoModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Lvinfo extends APIv1_Controller $this->response(); } } - + private function _validate($lvinfo = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lvregel.php b/application/controllers/api/v1/education/Lvregel.php index 8766add07..33410cb88 100644 --- a/application/controllers/api/v1/education/Lvregel.php +++ b/application/controllers/api/v1/education/Lvregel.php @@ -21,7 +21,7 @@ class Lvregel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lvregel' => 'basis/lvregel:rw')); // Load model LvregelModel $this->load->model('education/Lvregel_model', 'LvregelModel'); } @@ -32,11 +32,11 @@ class Lvregel extends APIv1_Controller public function getLvregel() { $lvregel_id = $this->get('lvregel_id'); - + if (isset($lvregel_id)) { $result = $this->LvregelModel->load($lvregel_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lvregel extends APIv1_Controller { $result = $this->LvregelModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lvregel extends APIv1_Controller $this->response(); } } - + private function _validate($lvregel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Lvregeltyp.php b/application/controllers/api/v1/education/Lvregeltyp.php index 912cb3e11..22fe0a9ff 100644 --- a/application/controllers/api/v1/education/Lvregeltyp.php +++ b/application/controllers/api/v1/education/Lvregeltyp.php @@ -21,7 +21,7 @@ class Lvregeltyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lvregeltyp' => 'basis/lvregeltyp:rw')); // Load model LvregeltypModel $this->load->model('education/Lvregeltyp_model', 'LvregeltypModel'); } @@ -32,11 +32,11 @@ class Lvregeltyp extends APIv1_Controller public function getLvregeltyp() { $lvregeltyp_kurzbz = $this->get('lvregeltyp_kurzbz'); - + if (isset($lvregeltyp_kurzbz)) { $result = $this->LvregeltypModel->load($lvregeltyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Lvregeltyp extends APIv1_Controller { $result = $this->LvregeltypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Lvregeltyp extends APIv1_Controller $this->response(); } } - + private function _validate($lvregeltyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Notenschluessel.php b/application/controllers/api/v1/education/Notenschluessel.php index 62ac99afb..91c7c513e 100644 --- a/application/controllers/api/v1/education/Notenschluessel.php +++ b/application/controllers/api/v1/education/Notenschluessel.php @@ -21,7 +21,7 @@ class Notenschluessel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Notenschluessel' => 'basis/notenschluessel:rw')); // Load model NotenschluesselModel $this->load->model('education/Notenschluessel_model', 'NotenschluesselModel'); } @@ -32,11 +32,11 @@ class Notenschluessel extends APIv1_Controller public function getNotenschluessel() { $notenschluessel_kurzbz = $this->get('notenschluessel_kurzbz'); - + if (isset($notenschluessel_kurzbz)) { $result = $this->NotenschluesselModel->load($notenschluessel_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Notenschluessel extends APIv1_Controller { $result = $this->NotenschluesselModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Notenschluessel extends APIv1_Controller $this->response(); } } - + private function _validate($notenschluessel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Notenschluesselaufteilung.php b/application/controllers/api/v1/education/Notenschluesselaufteilung.php index eb9e1c848..1e4b168ef 100644 --- a/application/controllers/api/v1/education/Notenschluesselaufteilung.php +++ b/application/controllers/api/v1/education/Notenschluesselaufteilung.php @@ -21,7 +21,7 @@ class Notenschluesselaufteilung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Notenschluesselaufteilung' => 'basis/notenschluesselaufteilung:rw')); // Load model NotenschluesselaufteilungModel $this->load->model('education/Notenschluesselaufteilung_model', 'NotenschluesselaufteilungModel'); } @@ -32,11 +32,11 @@ class Notenschluesselaufteilung extends APIv1_Controller public function getNotenschluesselaufteilung() { $notenschluesselaufteilung_id = $this->get('notenschluesselaufteilung_id'); - + if (isset($notenschluesselaufteilung_id)) { $result = $this->NotenschluesselaufteilungModel->load($notenschluesselaufteilung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Notenschluesselaufteilung extends APIv1_Controller { $result = $this->NotenschluesselaufteilungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Notenschluesselaufteilung extends APIv1_Controller $this->response(); } } - + private function _validate($notenschluesselaufteilung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Notenschluesseluebung.php b/application/controllers/api/v1/education/Notenschluesseluebung.php index e50319c2b..bb907f4ff 100644 --- a/application/controllers/api/v1/education/Notenschluesseluebung.php +++ b/application/controllers/api/v1/education/Notenschluesseluebung.php @@ -21,7 +21,7 @@ class Notenschluesseluebung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Notenschluesseluebung' => 'basis/notenschluesseluebung:rw')); // Load model NotenschluesseluebungModel $this->load->model('education/Notenschluesseluebung_model', 'NotenschluesseluebungModel'); } @@ -33,11 +33,11 @@ class Notenschluesseluebung extends APIv1_Controller { $note = $this->get('note'); $uebung_id = $this->get('uebung_id'); - + if (isset($note) && isset($uebung_id)) { $result = $this->NotenschluesseluebungModel->load(array($note, $uebung_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Notenschluesseluebung extends APIv1_Controller { $result = $this->NotenschluesseluebungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Notenschluesseluebung extends APIv1_Controller $this->response(); } } - + private function _validate($notenschluesseluebung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Notenschluesselzuordnung.php b/application/controllers/api/v1/education/Notenschluesselzuordnung.php index 18efc95d7..a4e7d757a 100644 --- a/application/controllers/api/v1/education/Notenschluesselzuordnung.php +++ b/application/controllers/api/v1/education/Notenschluesselzuordnung.php @@ -21,7 +21,7 @@ class Notenschluesselzuordnung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Notenschluesselzuordnung' => 'basis/notenschluesselzuordnung:rw')); // Load model NotenschluesselzuordnungModel $this->load->model('education/Notenschluesselzuordnung_model', 'NotenschluesselzuordnungModel'); } @@ -32,11 +32,11 @@ class Notenschluesselzuordnung extends APIv1_Controller public function getNotenschluesselzuordnung() { $notenschluesselzuordnung_id = $this->get('notenschluesselzuordnung_id'); - + if (isset($notenschluesselzuordnung_id)) { $result = $this->NotenschluesselzuordnungModel->load($notenschluesselzuordnung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Notenschluesselzuordnung extends APIv1_Controller { $result = $this->NotenschluesselzuordnungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Notenschluesselzuordnung extends APIv1_Controller $this->response(); } } - + private function _validate($notenschluesselzuordnung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Paabgabe.php b/application/controllers/api/v1/education/Paabgabe.php index 4f81ca9d1..87e9c2ec7 100644 --- a/application/controllers/api/v1/education/Paabgabe.php +++ b/application/controllers/api/v1/education/Paabgabe.php @@ -21,7 +21,7 @@ class Paabgabe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Paabgabe' => 'basis/paabgabe:rw')); // Load model PaabgabeModel $this->load->model('education/Paabgabe_model', 'PaabgabeModel'); } @@ -32,11 +32,11 @@ class Paabgabe extends APIv1_Controller public function getPaabgabe() { $paabgabe_id = $this->get('paabgabe_id'); - + if (isset($paabgabe_id)) { $result = $this->PaabgabeModel->load($paabgabe_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Paabgabe extends APIv1_Controller { $result = $this->PaabgabeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Paabgabe extends APIv1_Controller $this->response(); } } - + private function _validate($paabgabe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Paabgabetyp.php b/application/controllers/api/v1/education/Paabgabetyp.php index 248c609d9..999cbd57b 100644 --- a/application/controllers/api/v1/education/Paabgabetyp.php +++ b/application/controllers/api/v1/education/Paabgabetyp.php @@ -21,7 +21,7 @@ class Paabgabetyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Paabgabetyp' => 'basis/paabgabetyp:rw')); // Load model PaabgabetypModel $this->load->model('education/Paabgabetyp_model', 'PaabgabetypModel'); } @@ -32,11 +32,11 @@ class Paabgabetyp extends APIv1_Controller public function getPaabgabetyp() { $paabgabetyp_kurzbz = $this->get('paabgabetyp_kurzbz'); - + if (isset($paabgabetyp_kurzbz)) { $result = $this->PaabgabetypModel->load($paabgabetyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Paabgabetyp extends APIv1_Controller { $result = $this->PaabgabetypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Paabgabetyp extends APIv1_Controller $this->response(); } } - + private function _validate($paabgabetyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Projektarbeit.php b/application/controllers/api/v1/education/Projektarbeit.php index 7a6b32123..1b09fa4e7 100644 --- a/application/controllers/api/v1/education/Projektarbeit.php +++ b/application/controllers/api/v1/education/Projektarbeit.php @@ -21,7 +21,7 @@ class Projektarbeit extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projektarbeit' => 'basis/projektarbeit:rw')); // Load model ProjektarbeitModel $this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel'); } @@ -32,11 +32,11 @@ class Projektarbeit extends APIv1_Controller public function getProjektarbeit() { $projektarbeit_id = $this->get('projektarbeit_id'); - + if (isset($projektarbeit_id)) { $result = $this->ProjektarbeitModel->load($projektarbeit_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Projektarbeit extends APIv1_Controller { $result = $this->ProjektarbeitModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Projektarbeit extends APIv1_Controller $this->response(); } } - + private function _validate($projektarbeit = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Projektbetreuer.php b/application/controllers/api/v1/education/Projektbetreuer.php index d4d211137..b395b7e5f 100644 --- a/application/controllers/api/v1/education/Projektbetreuer.php +++ b/application/controllers/api/v1/education/Projektbetreuer.php @@ -21,7 +21,7 @@ class Projektbetreuer extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projektbetreuer' => 'basis/projektbetreuer:rw')); // Load model ProjektbetreuerModel $this->load->model('education/Projektbetreuer_model', 'ProjektbetreuerModel'); } @@ -34,11 +34,11 @@ class Projektbetreuer extends APIv1_Controller $betreuerart_kurzbz = $this->get('betreuerart_kurzbz'); $projektarbeit_id = $this->get('projektarbeit_id'); $person_id = $this->get('person_id'); - + if (isset($betreuerart_kurzbz) && isset($projektarbeit_id) && isset($person_id)) { $result = $this->ProjektbetreuerModel->load(array($betreuerart_kurzbz, $projektarbeit_id, $person_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,14 +60,14 @@ class Projektbetreuer extends APIv1_Controller $this->post()['projektarbeit_id'], $this->post()['person_id'] ); - + $result = $this->ProjektbetreuerModel->update($pksArray, $this->post()); } else { $result = $this->ProjektbetreuerModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -75,9 +75,9 @@ class Projektbetreuer extends APIv1_Controller $this->response(); } } - + private function _validate($projektbetreuer = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Projekttyp.php b/application/controllers/api/v1/education/Projekttyp.php index a0d70fec1..bf4c5d73a 100644 --- a/application/controllers/api/v1/education/Projekttyp.php +++ b/application/controllers/api/v1/education/Projekttyp.php @@ -21,7 +21,7 @@ class Projekttyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projekttyp' => 'basis/projekttyp:rw')); // Load model ProjekttypModel $this->load->model('education/Projekttyp_model', 'ProjekttypModel'); } @@ -32,11 +32,11 @@ class Projekttyp extends APIv1_Controller public function getProjekttyp() { $projekttyp_kurzbz = $this->get('projekttyp_kurzbz'); - + if (isset($projekttyp_kurzbz)) { $result = $this->ProjekttypModel->load($projekttyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Projekttyp extends APIv1_Controller { $result = $this->ProjekttypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Projekttyp extends APIv1_Controller $this->response(); } } - + private function _validate($projekttyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Pruefung.php b/application/controllers/api/v1/education/Pruefung.php index f402f035e..23fc97c8d 100644 --- a/application/controllers/api/v1/education/Pruefung.php +++ b/application/controllers/api/v1/education/Pruefung.php @@ -21,7 +21,7 @@ class Pruefung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefung' => 'basis/pruefung:rw')); // Load model PruefungModel $this->load->model('education/Pruefung_model', 'PruefungModel'); } @@ -32,11 +32,11 @@ class Pruefung extends APIv1_Controller public function getPruefung() { $pruefung_id = $this->get('pruefung_id'); - + if (isset($pruefung_id)) { $result = $this->PruefungModel->load($pruefung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Pruefung extends APIv1_Controller { $result = $this->PruefungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Pruefung extends APIv1_Controller $this->response(); } } - + private function _validate($pruefung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Pruefungsanmeldung.php b/application/controllers/api/v1/education/Pruefungsanmeldung.php index 286a77c1e..d65ded0b4 100644 --- a/application/controllers/api/v1/education/Pruefungsanmeldung.php +++ b/application/controllers/api/v1/education/Pruefungsanmeldung.php @@ -21,7 +21,7 @@ class Pruefungsanmeldung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefungsanmeldung' => 'basis/pruefungsanmeldung:rw')); // Load model PruefungsanmeldungModel $this->load->model('education/Pruefungsanmeldung_model', 'PruefungsanmeldungModel'); } @@ -32,11 +32,11 @@ class Pruefungsanmeldung extends APIv1_Controller public function getPruefungsanmeldung() { $pruefungsanmeldung_id = $this->get('pruefungsanmeldung_id'); - + if (isset($pruefungsanmeldung_id)) { $result = $this->PruefungsanmeldungModel->load($pruefungsanmeldung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Pruefungsanmeldung extends APIv1_Controller { $result = $this->PruefungsanmeldungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Pruefungsanmeldung extends APIv1_Controller $this->response(); } } - + private function _validate($pruefungsanmeldung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Pruefungsfenster.php b/application/controllers/api/v1/education/Pruefungsfenster.php index ddaa03aa1..50d13cff5 100644 --- a/application/controllers/api/v1/education/Pruefungsfenster.php +++ b/application/controllers/api/v1/education/Pruefungsfenster.php @@ -21,7 +21,7 @@ class Pruefungsfenster extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefungsfenster' => 'basis/pruefungsfenster:rw')); // Load model PruefungsfensterModel $this->load->model('education/Pruefungsfenster_model', 'PruefungsfensterModel'); } @@ -32,11 +32,11 @@ class Pruefungsfenster extends APIv1_Controller public function getPruefungsfenster() { $pruefungsfenster_id = $this->get('pruefungsfenster_id'); - + if (isset($pruefungsfenster_id)) { $result = $this->PruefungsfensterModel->load($pruefungsfenster_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Pruefungsfenster extends APIv1_Controller { $result = $this->PruefungsfensterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Pruefungsfenster extends APIv1_Controller $this->response(); } } - + private function _validate($pruefungsfenster = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Pruefungsstatus.php b/application/controllers/api/v1/education/Pruefungsstatus.php index da2c5adee..cbfbfb044 100644 --- a/application/controllers/api/v1/education/Pruefungsstatus.php +++ b/application/controllers/api/v1/education/Pruefungsstatus.php @@ -21,7 +21,7 @@ class Pruefungsstatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefungsstatus' => 'basis/pruefungsstatus:rw')); // Load model PruefungsstatusModel $this->load->model('education/Pruefungsstatus_model', 'PruefungsstatusModel'); } @@ -32,11 +32,11 @@ class Pruefungsstatus extends APIv1_Controller public function getPruefungsstatus() { $status_kurzbz = $this->get('status_kurzbz'); - + if (isset($status_kurzbz)) { $result = $this->PruefungsstatusModel->load($status_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Pruefungsstatus extends APIv1_Controller { $result = $this->PruefungsstatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Pruefungsstatus extends APIv1_Controller $this->response(); } } - + private function _validate($pruefungsstatus = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Pruefungstermin.php b/application/controllers/api/v1/education/Pruefungstermin.php index 59effc99e..fd16159dc 100644 --- a/application/controllers/api/v1/education/Pruefungstermin.php +++ b/application/controllers/api/v1/education/Pruefungstermin.php @@ -21,7 +21,7 @@ class Pruefungstermin extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefungstermin' => 'basis/pruefungstermin:rw')); // Load model PruefungsterminModel $this->load->model('education/Pruefungstermin_model', 'PruefungsterminModel'); } @@ -32,11 +32,11 @@ class Pruefungstermin extends APIv1_Controller public function getPruefungstermin() { $pruefungstermin_id = $this->get('pruefungstermin_id'); - + if (isset($pruefungstermin_id)) { $result = $this->PruefungsterminModel->load($pruefungstermin_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Pruefungstermin extends APIv1_Controller { $result = $this->PruefungsterminModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Pruefungstermin extends APIv1_Controller $this->response(); } } - + private function _validate($pruefungstermin = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Pruefungstyp.php b/application/controllers/api/v1/education/Pruefungstyp.php index 91820a853..4c460d5cd 100644 --- a/application/controllers/api/v1/education/Pruefungstyp.php +++ b/application/controllers/api/v1/education/Pruefungstyp.php @@ -21,7 +21,7 @@ class Pruefungstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefungstyp' => 'basis/pruefungstyp:rw')); // Load model PruefungstypModel $this->load->model('education/Pruefungstyp_model', 'PruefungstypModel'); } @@ -32,11 +32,11 @@ class Pruefungstyp extends APIv1_Controller public function getPruefungstyp() { $pruefungstyp_kurzbz = $this->get('pruefungstyp_kurzbz'); - + if (isset($pruefungstyp_kurzbz)) { $result = $this->PruefungstypModel->load($pruefungstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Pruefungstyp extends APIv1_Controller { $result = $this->PruefungstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Pruefungstyp extends APIv1_Controller $this->response(); } } - + private function _validate($pruefungstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Studentbeispiel.php b/application/controllers/api/v1/education/Studentbeispiel.php index a1dfa9fa9..45012231a 100644 --- a/application/controllers/api/v1/education/Studentbeispiel.php +++ b/application/controllers/api/v1/education/Studentbeispiel.php @@ -21,7 +21,7 @@ class Studentbeispiel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studentbeispiel' => 'basis/studentbeispiel:rw')); // Load model StudentbeispielModel $this->load->model('education/Studentbeispiel_model', 'StudentbeispielModel'); } @@ -33,11 +33,11 @@ class Studentbeispiel extends APIv1_Controller { $beispiel_id = $this->get('beispiel_id'); $student_uid = $this->get('student_uid'); - + if (isset($beispiel_id) && isset($student_uid)) { $result = $this->StudentbeispielModel->load(array($beispiel_id, $student_uid)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Studentbeispiel extends APIv1_Controller { $result = $this->StudentbeispielModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Studentbeispiel extends APIv1_Controller $this->response(); } } - + private function _validate($studentbeispiel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Studentlehrverband.php b/application/controllers/api/v1/education/Studentlehrverband.php index 3dccddae6..4793b0b1b 100644 --- a/application/controllers/api/v1/education/Studentlehrverband.php +++ b/application/controllers/api/v1/education/Studentlehrverband.php @@ -21,7 +21,7 @@ class Studentlehrverband extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studentlehrverband' => 'basis/studentlehrverband:rw')); // Load model StudentlehrverbandModel $this->load->model('education/Studentlehrverband_model', 'StudentlehrverbandModel'); } @@ -33,11 +33,11 @@ class Studentlehrverband extends APIv1_Controller { $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); $student_uid = $this->get('student_uid'); - + if (isset($studiensemester_kurzbz) && isset($student_uid)) { $result = $this->StudentlehrverbandModel->load(array($studiensemester_kurzbz, $student_uid)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Studentlehrverband extends APIv1_Controller { $result = $this->StudentlehrverbandModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Studentlehrverband extends APIv1_Controller $this->response(); } } - + private function _validate($studentlehrverband = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Studentuebung.php b/application/controllers/api/v1/education/Studentuebung.php index e069661ec..2a086610c 100644 --- a/application/controllers/api/v1/education/Studentuebung.php +++ b/application/controllers/api/v1/education/Studentuebung.php @@ -21,7 +21,7 @@ class Studentuebung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studentuebung' => 'basis/studentuebung:rw')); // Load model StudentuebungModel $this->load->model('education/Studentuebung_model', 'StudentuebungModel'); } @@ -33,11 +33,11 @@ class Studentuebung extends APIv1_Controller { $uebung_id = $this->get('uebung_id'); $student_uid = $this->get('student_uid'); - + if (isset($uebung_id) && isset($student_uid)) { $result = $this->StudentuebungModel->load(array($uebung_id, $student_uid)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -61,7 +61,7 @@ class Studentuebung extends APIv1_Controller { $result = $this->StudentuebungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -69,9 +69,9 @@ class Studentuebung extends APIv1_Controller $this->response(); } } - + private function _validate($studentuebung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Uebung.php b/application/controllers/api/v1/education/Uebung.php index 8cb394cf2..41d8f8448 100644 --- a/application/controllers/api/v1/education/Uebung.php +++ b/application/controllers/api/v1/education/Uebung.php @@ -21,7 +21,7 @@ class Uebung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Uebung' => 'basis/uebung:rw')); // Load model UebungModel $this->load->model('education/uebung_model', 'UebungModel'); } @@ -32,11 +32,11 @@ class Uebung extends APIv1_Controller public function getUebung() { $uebung_id = $this->get('uebung_id'); - + if (isset($uebung_id)) { $result = $this->UebungModel->load($uebung_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Uebung extends APIv1_Controller { $result = $this->UebungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Uebung extends APIv1_Controller $this->response(); } } - + private function _validate($uebung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Zeugnis.php b/application/controllers/api/v1/education/Zeugnis.php index f94d56768..86af07284 100644 --- a/application/controllers/api/v1/education/Zeugnis.php +++ b/application/controllers/api/v1/education/Zeugnis.php @@ -21,7 +21,7 @@ class Zeugnis extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeugnis' => 'basis/zeugnis:rw')); // Load model ZeugnisModel $this->load->model('education/Zeugnis_model', 'ZeugnisModel'); } @@ -32,11 +32,11 @@ class Zeugnis extends APIv1_Controller public function getZeugnis() { $zeugnis_id = $this->get('zeugnis_id'); - + if (isset($zeugnis_id)) { $result = $this->ZeugnisModel->load($zeugnis_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,7 +60,7 @@ class Zeugnis extends APIv1_Controller { $result = $this->ZeugnisModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -68,9 +68,9 @@ class Zeugnis extends APIv1_Controller $this->response(); } } - + private function _validate($zeugnis = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/education/Zeugnisnote.php b/application/controllers/api/v1/education/Zeugnisnote.php index ffeb56486..10083865e 100644 --- a/application/controllers/api/v1/education/Zeugnisnote.php +++ b/application/controllers/api/v1/education/Zeugnisnote.php @@ -21,7 +21,7 @@ class Zeugnisnote extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeugnisnote' => 'basis/zeugnisnote:rw')); // Load model ZeugnisnoteModel $this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel'); } @@ -34,11 +34,11 @@ class Zeugnisnote extends APIv1_Controller $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); $student_uid = $this->get('student_uid'); $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); - + if (isset($studiensemester_kurzbz) && isset($student_uid) && isset($lehrveranstaltung_id)) { $result = $this->ZeugnisnoteModel->load(array($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -60,14 +60,14 @@ class Zeugnisnote extends APIv1_Controller $this->post()['student_uid'], $this->post()['lehrveranstaltung_id'] ); - + $result = $this->ZeugnisnoteModel->update($pksArray, $this->post()); } else { $result = $this->ZeugnisnoteModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -75,9 +75,9 @@ class Zeugnisnote extends APIv1_Controller $this->response(); } } - + private function _validate($zeugnisnote = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Erhalter.php b/application/controllers/api/v1/organisation/Erhalter.php index fdfb836a3..0098f7fcc 100644 --- a/application/controllers/api/v1/organisation/Erhalter.php +++ b/application/controllers/api/v1/organisation/Erhalter.php @@ -21,11 +21,11 @@ class Erhalter extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Erhalter' => 'basis/erhalter:rw')); // Load model ErhalterModel $this->load->model('organisation/erhalter_model', 'ErhalterModel'); - - + + } /** @@ -34,11 +34,11 @@ class Erhalter extends APIv1_Controller public function getErhalter() { $erhalter_kz = $this->get('erhalter_kz'); - + if (isset($erhalter_kz)) { $result = $this->ErhalterModel->load($erhalter_kz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Erhalter extends APIv1_Controller { $result = $this->ErhalterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Erhalter extends APIv1_Controller $this->response(); } } - + private function _validate($erhalter = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Fachbereich2.php b/application/controllers/api/v1/organisation/Fachbereich2.php index dfe9e18c8..a2d3d3838 100644 --- a/application/controllers/api/v1/organisation/Fachbereich2.php +++ b/application/controllers/api/v1/organisation/Fachbereich2.php @@ -21,11 +21,11 @@ class Fachbereich2 extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Fachbereich' => 'basis/fachbereich:rw')); // Load model FachbereichModel $this->load->model('organisation/fachbereich_model', 'FachbereichModel'); - - + + } /** @@ -34,11 +34,11 @@ class Fachbereich2 extends APIv1_Controller public function getFachbereich() { $fachbereich_kurzbz = $this->get('fachbereich_kurzbz'); - + if (isset($fachbereich_kurzbz)) { $result = $this->FachbereichModel->load($fachbereich_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Fachbereich2 extends APIv1_Controller { $result = $this->FachbereichModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Fachbereich2 extends APIv1_Controller $this->response(); } } - + private function _validate($fachbereich = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Ferien.php b/application/controllers/api/v1/organisation/Ferien.php index e4e027da8..e943a7e66 100644 --- a/application/controllers/api/v1/organisation/Ferien.php +++ b/application/controllers/api/v1/organisation/Ferien.php @@ -21,11 +21,11 @@ class Ferien extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ferien' => 'basis/ferien:rw')); // Load model FerienModel $this->load->model('organisation/ferien_model', 'FerienModel'); - - + + } /** @@ -35,11 +35,11 @@ class Ferien extends APIv1_Controller { $studiengang_kz = $this->get('studiengang_kz'); $bezeichnung = $this->get('bezeichnung'); - + if (isset($studiengang_kz) && isset($bezeichnung)) { $result = $this->FerienModel->load(array($studiengang_kz, $bezeichnung)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Ferien extends APIv1_Controller { $result = $this->FerienModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Ferien extends APIv1_Controller $this->response(); } } - + private function _validate($ferien = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php index dc8fd1d0b..2dfa9f400 100644 --- a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php +++ b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php @@ -21,11 +21,11 @@ class Geschaeftsjahr2 extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Geschaeftsjahr' => 'basis/geschaeftsjahr:rw')); // Load model GeschaeftsjahrModel $this->load->model('organisation/geschaeftsjahr_model', 'GeschaeftsjahrModel'); - - + + } /** @@ -34,11 +34,11 @@ class Geschaeftsjahr2 extends APIv1_Controller public function getGeschaeftsjahr() { $geschaeftsjahr_kurzbz = $this->get('geschaeftsjahr_kurzbz'); - + if (isset($geschaeftsjahr_kurzbz)) { $result = $this->GeschaeftsjahrModel->load($geschaeftsjahr_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Geschaeftsjahr2 extends APIv1_Controller { $result = $this->GeschaeftsjahrModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Geschaeftsjahr2 extends APIv1_Controller $this->response(); } } - + private function _validate($geschaeftsjahr = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Gruppe.php b/application/controllers/api/v1/organisation/Gruppe.php index 21a9965b8..e3ef92fa4 100644 --- a/application/controllers/api/v1/organisation/Gruppe.php +++ b/application/controllers/api/v1/organisation/Gruppe.php @@ -21,11 +21,11 @@ class Gruppe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Gruppe' => 'basis/gruppe:rw')); // Load model GruppeModel $this->load->model('organisation/gruppe_model', 'GruppeModel'); - - + + } /** @@ -34,11 +34,11 @@ class Gruppe extends APIv1_Controller public function getGruppe() { $gruppe_kurzbz = $this->get('gruppe_kurzbz'); - + if (isset($gruppe_kurzbz)) { $result = $this->GruppeModel->load($gruppe_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Gruppe extends APIv1_Controller { $result = $this->GruppeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Gruppe extends APIv1_Controller $this->response(); } } - + private function _validate($gruppe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Lehrverband.php b/application/controllers/api/v1/organisation/Lehrverband.php index 3173f025b..9b12dcf90 100644 --- a/application/controllers/api/v1/organisation/Lehrverband.php +++ b/application/controllers/api/v1/organisation/Lehrverband.php @@ -21,11 +21,11 @@ class Lehrverband extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrverband' => 'basis/lehrverband:rw')); // Load model LehrverbandModel $this->load->model('organisation/lehrverband_model', 'LehrverbandModel'); - - + + } /** @@ -37,11 +37,11 @@ class Lehrverband extends APIv1_Controller $verband = $this->get('verband'); $semester = $this->get('semester'); $studiengang_kz = $this->get('studiengang_kz'); - + if (isset($gruppe) && isset($verband) && isset($semester) && isset($studiengang_kz)) { $result = $this->LehrverbandModel->load(array($gruppe, $verband, $semester, $studiengang_kz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -65,14 +65,14 @@ class Lehrverband extends APIv1_Controller $this->post()['semester'], $this->post()['studiengang_kz'] ); - + $result = $this->LehrverbandModel->update($pksArray, $this->post()); } else { $result = $this->LehrverbandModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -80,9 +80,9 @@ class Lehrverband extends APIv1_Controller $this->response(); } } - + private function _validate($lehrverband = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Organisationseinheit2.php b/application/controllers/api/v1/organisation/Organisationseinheit2.php index 0d46839f0..3f62bbdf1 100644 --- a/application/controllers/api/v1/organisation/Organisationseinheit2.php +++ b/application/controllers/api/v1/organisation/Organisationseinheit2.php @@ -21,11 +21,11 @@ class Organisationseinheit2 extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Organisationseinheit' => 'basis/organisationseinheit:rw')); // Load model OrganisationseinheitModel $this->load->model('organisation/organisationseinheit_model', 'OrganisationseinheitModel'); - - + + } /** @@ -34,11 +34,11 @@ class Organisationseinheit2 extends APIv1_Controller public function getOrganisationseinheit() { $oe_kurzbz = $this->get('oe_kurzbz'); - + if (isset($oe_kurzbz)) { $result = $this->OrganisationseinheitModel->load($oe_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Organisationseinheit2 extends APIv1_Controller { $result = $this->OrganisationseinheitModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Organisationseinheit2 extends APIv1_Controller $this->response(); } } - + private function _validate($organisationseinheit = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Organisationseinheittyp.php b/application/controllers/api/v1/organisation/Organisationseinheittyp.php index 2998c652d..62a723b1e 100644 --- a/application/controllers/api/v1/organisation/Organisationseinheittyp.php +++ b/application/controllers/api/v1/organisation/Organisationseinheittyp.php @@ -21,11 +21,11 @@ class Organisationseinheittyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Organisationseinheittyp' => 'basis/organisationseinheittyp:rw')); // Load model OrganisationseinheittypModel $this->load->model('organisation/organisationseinheittyp_model', 'OrganisationseinheittypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Organisationseinheittyp extends APIv1_Controller public function getOrganisationseinheittyp() { $organisationseinheittyp_kurzbz = $this->get('organisationseinheittyp_kurzbz'); - + if (isset($organisationseinheittyp_kurzbz)) { $result = $this->OrganisationseinheittypModel->load($organisationseinheittyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Organisationseinheittyp extends APIv1_Controller { $result = $this->OrganisationseinheittypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Organisationseinheittyp extends APIv1_Controller $this->response(); } } - + private function _validate($organisationseinheittyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Semesterwochen.php b/application/controllers/api/v1/organisation/Semesterwochen.php index 8ba837a64..2dbd26ab0 100644 --- a/application/controllers/api/v1/organisation/Semesterwochen.php +++ b/application/controllers/api/v1/organisation/Semesterwochen.php @@ -21,11 +21,11 @@ class Semesterwochen extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Semesterwochen' => 'basis/semesterwochen:rw')); // Load model SemesterwochenModel $this->load->model('organisation/semesterwochen_model', 'SemesterwochenModel'); - - + + } /** @@ -35,11 +35,11 @@ class Semesterwochen extends APIv1_Controller { $studiengang_kz = $this->get('studiengang_kz'); $semester = $this->get('semester'); - + if (isset($studiengang_kz) && isset($semester)) { $result = $this->SemesterwochenModel->load(array($studiengang_kz, $semester)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Semesterwochen extends APIv1_Controller { $result = $this->SemesterwochenModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Semesterwochen extends APIv1_Controller $this->response(); } } - + private function _validate($semesterwochen = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Service.php b/application/controllers/api/v1/organisation/Service.php index e49b92122..4d1988430 100644 --- a/application/controllers/api/v1/organisation/Service.php +++ b/application/controllers/api/v1/organisation/Service.php @@ -21,11 +21,11 @@ class Service extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Service' => 'basis/service:rw')); // Load model ServiceModel $this->load->model('organisation/service_model', 'ServiceModel'); - - + + } /** @@ -34,11 +34,11 @@ class Service extends APIv1_Controller public function getService() { $serviceID = $this->get('service_id'); - + if (isset($serviceID)) { $result = $this->ServiceModel->load($serviceID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Service extends APIv1_Controller { $result = $this->ServiceModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Service extends APIv1_Controller $this->response(); } } - + private function _validate($service = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Standort.php b/application/controllers/api/v1/organisation/Standort.php index c2537c592..16c206401 100644 --- a/application/controllers/api/v1/organisation/Standort.php +++ b/application/controllers/api/v1/organisation/Standort.php @@ -21,11 +21,11 @@ class Standort extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Standort' => 'basis/standort:rw')); // Load model StandortModel $this->load->model('organisation/standort_model', 'StandortModel'); - - + + } /** @@ -34,11 +34,11 @@ class Standort extends APIv1_Controller public function getStandort() { $standortID = $this->get('standort_id'); - + if (isset($standortID)) { $result = $this->StandortModel->load($standortID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Standort extends APIv1_Controller { $result = $this->StandortModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Standort extends APIv1_Controller $this->response(); } } - + private function _validate($standort = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Statistik.php b/application/controllers/api/v1/organisation/Statistik.php index 5e69a53d5..b85c27f42 100644 --- a/application/controllers/api/v1/organisation/Statistik.php +++ b/application/controllers/api/v1/organisation/Statistik.php @@ -21,11 +21,17 @@ class Statistik extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Statistik' => 'basis/statistik:rw', + 'All' => 'basis/statistik:r', + 'MenueArray' => 'basis/statistik:r' + ) + ); // Load model StatistikModel $this->load->model('organisation/statistik_model', 'StatistikModel'); - - + + } /** @@ -34,11 +40,11 @@ class Statistik extends APIv1_Controller public function getStatistik() { $statistik_kurzbz = $this->get('statistik_kurzbz'); - + if (isset($statistik_kurzbz)) { $result = $this->StatistikModel->load($statistik_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -46,19 +52,19 @@ class Statistik extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function getAll() { $this->StatistikModel->addOrder($this->get('order')); - + $result = $this->StatistikModel->load(); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ @@ -67,9 +73,9 @@ class Statistik extends APIv1_Controller $this->StatistikModel->addOrder('gruppe'); $this->StatistikModel->addOrder('bezeichnung'); $this->StatistikModel->addOrder('statistik_kurzbz'); - + $result = $this->StatistikModel->load(); - + $this->response($result, REST_Controller::HTTP_OK); } @@ -88,7 +94,7 @@ class Statistik extends APIv1_Controller { $result = $this->StatistikModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -96,9 +102,9 @@ class Statistik extends APIv1_Controller $this->response(); } } - + private function _validate($statistik = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studiengang2.php b/application/controllers/api/v1/organisation/Studiengang2.php index bea2f218e..2e1b549ff 100644 --- a/application/controllers/api/v1/organisation/Studiengang2.php +++ b/application/controllers/api/v1/organisation/Studiengang2.php @@ -20,7 +20,17 @@ class Studiengang2 extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Studiengang' => 'basis/studiengang:r', + 'AllForBewerbung' => 'basis/studiengang:r', + 'StudiengangStudienplan' => 'basis/studiengang:r', + 'StudiengangBewerbung' => 'basis/studiengang:r', + 'AppliedStudiengang' => 'basis/studiengang:r', + 'AppliedStudiengangFromNow' => 'basis/studiengang:r', + 'AppliedStudiengangFromNowOE' => 'basis/studiengang:r' + ) + ); // Load model PersonModel $this->load->model('organisation/studiengang_model', 'StudiengangModel'); diff --git a/application/controllers/api/v1/organisation/Studiengangstyp.php b/application/controllers/api/v1/organisation/Studiengangstyp.php index a0293c229..b10811636 100644 --- a/application/controllers/api/v1/organisation/Studiengangstyp.php +++ b/application/controllers/api/v1/organisation/Studiengangstyp.php @@ -21,11 +21,11 @@ class Studiengangstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studiengangstyp' => 'basis/studiengangstyp:rw')); // Load model StudiengangstypModel $this->load->model('organisation/studiengangstyp_model', 'StudiengangstypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Studiengangstyp extends APIv1_Controller public function getStudiengangstyp() { $typ = $this->get('typ'); - + if (isset($typ)) { $result = $this->StudiengangstypModel->load($typ); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Studiengangstyp extends APIv1_Controller { $result = $this->StudiengangstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Studiengangstyp extends APIv1_Controller $this->response(); } } - + private function _validate($studiengangstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studienjahr.php b/application/controllers/api/v1/organisation/Studienjahr.php index 8860dbd39..eb7c38847 100644 --- a/application/controllers/api/v1/organisation/Studienjahr.php +++ b/application/controllers/api/v1/organisation/Studienjahr.php @@ -21,11 +21,11 @@ class Studienjahr extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studienjahr' => 'basis/studienjahr:rw')); // Load model StudienjahrModel $this->load->model('organisation/studienjahr_model', 'StudienjahrModel'); - - + + } /** @@ -34,11 +34,11 @@ class Studienjahr extends APIv1_Controller public function getStudienjahr() { $studienjahr_kurzbz = $this->get('studienjahr_kurzbz'); - + if (isset($studienjahr_kurzbz)) { $result = $this->StudienjahrModel->load($studienjahr_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Studienjahr extends APIv1_Controller { $result = $this->StudienjahrModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Studienjahr extends APIv1_Controller $this->response(); } } - + private function _validate($studienjahr = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studienordnung.php b/application/controllers/api/v1/organisation/Studienordnung.php index c791898c9..122c8f099 100644 --- a/application/controllers/api/v1/organisation/Studienordnung.php +++ b/application/controllers/api/v1/organisation/Studienordnung.php @@ -21,11 +21,11 @@ class Studienordnung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studienordnung' => 'lehre/studienordnung:rw')); // Load model StudienordnungModel $this->load->model('organisation/studienordnung_model', 'StudienordnungModel'); - - + + } /** @@ -34,11 +34,11 @@ class Studienordnung extends APIv1_Controller public function getStudienordnung() { $studienordnungID = $this->get('studienordnung_id'); - + if (isset($studienordnungID)) { $result = $this->StudienordnungModel->load($studienordnungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Studienordnung extends APIv1_Controller { $result = $this->StudienordnungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Studienordnung extends APIv1_Controller $this->response(); } } - + private function _validate($studienordnung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studienordnungstatus.php b/application/controllers/api/v1/organisation/Studienordnungstatus.php index 52d292850..30d38c4ad 100644 --- a/application/controllers/api/v1/organisation/Studienordnungstatus.php +++ b/application/controllers/api/v1/organisation/Studienordnungstatus.php @@ -21,11 +21,11 @@ class Studienordnungstatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studienordnungstatus' => 'lehre/studienordnungstatus:rw')); // Load model StudienordnungstatusModel $this->load->model('organisation/studienordnungstatus_model', 'StudienordnungstatusModel'); - - + + } /** @@ -34,11 +34,11 @@ class Studienordnungstatus extends APIv1_Controller public function getStudienordnungstatus() { $status_kurzbz = $this->get('status_kurzbz'); - + if (isset($status_kurzbz)) { $result = $this->StudienordnungstatusModel->load($status_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Studienordnungstatus extends APIv1_Controller { $result = $this->StudienordnungstatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Studienordnungstatus extends APIv1_Controller $this->response(); } } - + private function _validate($studienordnungstatus = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studienplan.php b/application/controllers/api/v1/organisation/Studienplan.php index 68a0a2095..0c1db0af7 100644 --- a/application/controllers/api/v1/organisation/Studienplan.php +++ b/application/controllers/api/v1/organisation/Studienplan.php @@ -21,19 +21,25 @@ class Studienplan extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Studienplan' => 'lehre/studienplan:r', + 'Studienplaene' => 'lehre/studienplan:r', + 'StudienplaeneFromSem' => 'lehre/studienplan:r' + ) + ); // Load model PersonModel $this->load->model("organisation/studienplan_model", "StudienplanModel"); } - + public function getStudienplan() { $studienplan_id = $this->get("studienplan_id"); - + if (isset($studienplan_id)) { $result = $this->StudienplanModel->load($studienplan_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -41,15 +47,15 @@ class Studienplan extends APIv1_Controller $this->response(); } } - + public function getStudienplaene() { $studiengang_kz = $this->get("studiengang_kz"); - + if (isset($studiengang_kz)) { $result = $this->StudienplanModel->getStudienplaene($studiengang_kz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -57,14 +63,14 @@ class Studienplan extends APIv1_Controller $this->response(); } } - + public function getStudienplaeneFromSem() { $studiengang_kz = $this->get("studiengang_kz"); $studiensemester_kurzbz = $this->get("studiensemester_kurzbz"); $ausbildungssemester = $this->get("ausbildungssemester"); $orgform_kurzbz = $this->get("orgform_kurzbz"); - + if (isset($studiengang_kz) && isset($studiensemester_kurzbz)) { $result = $this->StudienplanModel->getStudienplaeneBySemester( @@ -73,7 +79,7 @@ class Studienplan extends APIv1_Controller $ausbildungssemester, $orgform_kurzbz ); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -81,4 +87,4 @@ class Studienplan extends APIv1_Controller $this->response(); } } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studienplatz.php b/application/controllers/api/v1/organisation/Studienplatz.php index bb0dc5e12..88ce6a12d 100644 --- a/application/controllers/api/v1/organisation/Studienplatz.php +++ b/application/controllers/api/v1/organisation/Studienplatz.php @@ -21,11 +21,11 @@ class Studienplatz extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Studienplatz' => 'basis/studienplatz:rw')); // Load model StudienplatzModel $this->load->model('organisation/studienplatz_model', 'StudienplatzModel'); - - + + } /** @@ -34,11 +34,11 @@ class Studienplatz extends APIv1_Controller public function getStudienplatz() { $studienplatzID = $this->get('studienplatz_id'); - + if (isset($studienplatzID)) { $result = $this->StudienplatzModel->load($studienplatzID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Studienplatz extends APIv1_Controller { $result = $this->StudienplatzModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Studienplatz extends APIv1_Controller $this->response(); } } - + private function _validate($studienplatz = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/organisation/Studiensemester.php b/application/controllers/api/v1/organisation/Studiensemester.php index 398ccfa58..f714214d9 100644 --- a/application/controllers/api/v1/organisation/Studiensemester.php +++ b/application/controllers/api/v1/organisation/Studiensemester.php @@ -21,11 +21,25 @@ class Studiensemester extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct( + array( + 'Studiensemester' => 'basis/studiensemester:rw', + 'NextStudiensemester' => 'basis/studiensemester:r', + 'All' => 'basis/studiensemester:r', + 'Akt' => 'basis/studiensemester:r', + 'AktNext' => 'basis/studiensemester:r', + 'LastOrAktSemester' => 'basis/studiensemester:r', + 'NextFrom' => 'basis/studiensemester:r', + 'Previous' => 'basis/studiensemester:r', + 'Nearest' => 'basis/studiensemester:r', + 'Finished' => 'basis/studiensemester:r', + 'Timestamp' => 'basis/studiensemester:r' + ) + ); // Load model StudiensemesterModel $this->load->model('organisation/studiensemester_model', 'StudiensemesterModel'); - - + + } /** @@ -34,11 +48,11 @@ class Studiensemester extends APIv1_Controller public function getStudiensemester() { $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); - + if (isset($studiensemester_kurzbz)) { $result = $this->StudiensemesterModel->load($studiensemester_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -46,17 +60,17 @@ class Studiensemester extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function getNextStudiensemester() { $art = $this->get('art'); - + $this->StudiensemesterModel->addOrder('start'); $this->StudiensemesterModel->addLimit(1); - + if (isset($art)) { $result = $this->StudiensemesterModel->loadWhere( @@ -72,14 +86,14 @@ class Studiensemester extends APIv1_Controller $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getAll() { $order = $this->get('order'); - + if (strcasecmp($order, 'DESC') == 0) { $this->StudiensemesterModel->addOrder('ende', 'DESC'); @@ -88,12 +102,12 @@ class Studiensemester extends APIv1_Controller { $this->StudiensemesterModel->addOrder('ende', 'ASC'); } - + $result = $this->StudiensemesterModel->load(); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ @@ -103,28 +117,28 @@ class Studiensemester extends APIv1_Controller $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getAktNext() { $semester = $this->get('semester'); - + $result = null; - + if (!is_numeric($semester)) { $result = $this->StudiensemesterModel->loadWhere(array('start <=' => 'NOW()', 'ende >=' => 'NOW()')); } - + if (!hasData($result)) { $this->StudiensemesterModel->addOrder('ende'); $this->StudiensemesterModel->addLimit(1); - + $whereArray = array('ende >=' => 'NOW()'); - + if (is_numeric($semester)) { if ($semester % 2 == 0) @@ -138,33 +152,33 @@ class Studiensemester extends APIv1_Controller $whereArray['SUBSTRING(studiensemester_kurzbz FROM 1 FOR 2) ='] = $ss; } - + $result = $this->StudiensemesterModel->loadWhere($whereArray); } - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getLastOrAktSemester() { $result = $this->StudiensemesterModel->getLastOrAktSemester($this->get('days')); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getNextFrom() { $result = $this->StudiensemesterModel->getNextFrom($this->get('studiensemester_kurzbz')); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ @@ -172,12 +186,12 @@ class Studiensemester extends APIv1_Controller { $this->StudiensemesterModel->addOrder('ende', 'DESC'); $this->StudiensemesterModel->addLimit(1); - + $result = $this->StudiensemesterModel->loadWhere(array('ende <' => 'NOW()')); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ @@ -187,37 +201,37 @@ class Studiensemester extends APIv1_Controller $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getFinished() { $limit = $this->get('limit'); - + $this->StudiensemesterModel->addOrder('ende', 'DESC'); $this->StudiensemesterModel->addLimit($limit); - + $result = $this->StudiensemesterModel->loadWhere(array('start <=' => 'NOW()')); - + $this->response($result, REST_Controller::HTTP_OK); } - + /** * @return void */ public function getTimestamp() { $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); - + if (isset($studiensemester_kurzbz)) { $result = $this->StudiensemesterModel->load($studiensemester_kurzbz); - + if (is_array($result->retval) && count($result->retval) > 0) { $studiensemester = $result->retval[0]; - + if (is_object($studiensemester)) { $start = ""; @@ -239,7 +253,7 @@ class Studiensemester extends APIv1_Controller mb_substr($studiensemester->ende, 0, 4) ); } - + $result->retval = array( 'studiensemester_kurzbz' => $studiensemester_kurzbz, 'start' => $start, @@ -247,7 +261,7 @@ class Studiensemester extends APIv1_Controller ); } } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -271,7 +285,7 @@ class Studiensemester extends APIv1_Controller { $result = $this->StudiensemesterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -279,9 +293,9 @@ class Studiensemester extends APIv1_Controller $this->response(); } } - + private function _validate($studiensemester = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Adresse.php b/application/controllers/api/v1/person/Adresse.php index 04c8de722..ddbbfe554 100644 --- a/application/controllers/api/v1/person/Adresse.php +++ b/application/controllers/api/v1/person/Adresse.php @@ -22,21 +22,21 @@ class Adresse extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Adresse' => 'basis/adresse:rw')); // Load model PersonModel $this->load->model('person/Adresse_model', 'AdresseModel'); - - + + } public function getAdresse() { $personID = $this->get("person_id"); - + if (isset($personID)) { $result = $this->AdresseModel->loadWhere(array('person_id' => $personID)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -44,11 +44,11 @@ class Adresse extends APIv1_Controller $this->response(); } } - + public function postAdresse() { $adresse = $this->post(); - + if (is_array($adresse)) { if (isset($adresse['adresse_id'])) @@ -59,7 +59,7 @@ class Adresse extends APIv1_Controller { $result = $this->AdresseModel->insert($adresse); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -67,4 +67,4 @@ class Adresse extends APIv1_Controller $this->response(); } } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Bankverbindung.php b/application/controllers/api/v1/person/Bankverbindung.php index 42a1f5c15..06f6b040d 100644 --- a/application/controllers/api/v1/person/Bankverbindung.php +++ b/application/controllers/api/v1/person/Bankverbindung.php @@ -21,11 +21,11 @@ class Bankverbindung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Bankverbindung' => 'basis/bankverbindung:rw')); // Load model BankverbindungModel $this->load->model('person/bankverbindung_model', 'BankverbindungModel'); - - + + } /** @@ -34,11 +34,11 @@ class Bankverbindung extends APIv1_Controller public function getBankverbindung() { $bankverbindungID = $this->get('bankverbindung_id'); - + if (isset($bankverbindungID)) { $result = $this->BankverbindungModel->load($bankverbindungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Bankverbindung extends APIv1_Controller { $result = $this->BankverbindungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Bankverbindung extends APIv1_Controller $this->response(); } } - + private function _validate($bankverbindung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Benutzer.php b/application/controllers/api/v1/person/Benutzer.php index 33687f6f0..23fcdadac 100644 --- a/application/controllers/api/v1/person/Benutzer.php +++ b/application/controllers/api/v1/person/Benutzer.php @@ -21,11 +21,11 @@ class Benutzer extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Benutzer' => 'basis/benutzer:rw')); // Load model BenutzerModel $this->load->model('person/benutzer_model', 'BenutzerModel'); - - + + } /** @@ -34,11 +34,11 @@ class Benutzer extends APIv1_Controller public function getBenutzer() { $uid = $this->get('uid'); - + if (isset($uid)) { $result = $this->BenutzerModel->load($uid); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Benutzer extends APIv1_Controller { $result = $this->BenutzerModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Benutzer extends APIv1_Controller $this->response(); } } - + private function _validate($benutzer = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Benutzerfunktion.php b/application/controllers/api/v1/person/Benutzerfunktion.php index 93b793287..98fd8654a 100644 --- a/application/controllers/api/v1/person/Benutzerfunktion.php +++ b/application/controllers/api/v1/person/Benutzerfunktion.php @@ -21,11 +21,11 @@ class Benutzerfunktion extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Benutzerfunktion' => 'basis/benutzerfunktion:rw')); // Load model BenutzerfunktionModel $this->load->model('person/benutzerfunktion_model', 'BenutzerfunktionModel'); - - + + } /** @@ -34,11 +34,11 @@ class Benutzerfunktion extends APIv1_Controller public function getBenutzerfunktion() { $benutzerfunktionID = $this->get('benutzerfunktion_id'); - + if (isset($benutzerfunktionID)) { $result = $this->BenutzerfunktionModel->load($benutzerfunktionID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Benutzerfunktion extends APIv1_Controller { $result = $this->BenutzerfunktionModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Benutzerfunktion extends APIv1_Controller $this->response(); } } - + private function _validate($benutzerfunktion = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Benutzergruppe.php b/application/controllers/api/v1/person/Benutzergruppe.php index b70e08014..0adc8c73a 100644 --- a/application/controllers/api/v1/person/Benutzergruppe.php +++ b/application/controllers/api/v1/person/Benutzergruppe.php @@ -21,11 +21,11 @@ class Benutzergruppe extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Benutzergruppe' => 'basis/benutzergruppe:rw')); // Load model BenutzergruppeModel $this->load->model('person/benutzergruppe_model', 'BenutzergruppeModel'); - - + + } /** @@ -35,11 +35,11 @@ class Benutzergruppe extends APIv1_Controller { $gruppe_kurzbz = $this->get('gruppe_kurzbz'); $uid = $this->get('uid'); - + if (isset($gruppe_kurzbz) && isset($uid)) { $result = $this->BenutzergruppeModel->load(array($gruppe_kurzbz, $uid)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Benutzergruppe extends APIv1_Controller { $result = $this->BenutzergruppeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Benutzergruppe extends APIv1_Controller $this->response(); } } - + private function _validate($benutzergruppe = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Fotostatus.php b/application/controllers/api/v1/person/Fotostatus.php index ea74649da..acd1ef5b6 100644 --- a/application/controllers/api/v1/person/Fotostatus.php +++ b/application/controllers/api/v1/person/Fotostatus.php @@ -21,11 +21,11 @@ class Fotostatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Fotostatus' => 'basis/fotostatus:rw')); // Load model FotostatusModel $this->load->model('person/fotostatus_model', 'FotostatusModel'); - - + + } /** @@ -34,11 +34,11 @@ class Fotostatus extends APIv1_Controller public function getFotostatus() { $fotostatus_kurzbz = $this->get('fotostatus_kurzbz'); - + if (isset($fotostatus_kurzbz)) { $result = $this->FotostatusModel->load($fotostatus_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Fotostatus extends APIv1_Controller { $result = $this->FotostatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Fotostatus extends APIv1_Controller $this->response(); } } - + private function _validate($fotostatus = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Freebusy.php b/application/controllers/api/v1/person/Freebusy.php index c8ca32b36..eb1651c00 100644 --- a/application/controllers/api/v1/person/Freebusy.php +++ b/application/controllers/api/v1/person/Freebusy.php @@ -21,11 +21,11 @@ class Freebusy extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Freebusy' => 'basis/freebusy:rw')); // Load model FreebusyModel $this->load->model('person/freebusy_model', 'FreebusyModel'); - - + + } /** @@ -34,11 +34,11 @@ class Freebusy extends APIv1_Controller public function getFreebusy() { $freebusyID = $this->get('freebusy_id'); - + if (isset($freebusyID)) { $result = $this->FreebusyModel->load($freebusyID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Freebusy extends APIv1_Controller { $result = $this->FreebusyModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Freebusy extends APIv1_Controller $this->response(); } } - + private function _validate($freebusy = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Freebusytyp.php b/application/controllers/api/v1/person/Freebusytyp.php index f3dac4792..0187035d1 100644 --- a/application/controllers/api/v1/person/Freebusytyp.php +++ b/application/controllers/api/v1/person/Freebusytyp.php @@ -21,11 +21,11 @@ class Freebusytyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Freebusytyp' => 'basis/freebusytyp:rw')); // Load model FreebusytypModel $this->load->model('person/freebusytyp_model', 'FreebusytypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Freebusytyp extends APIv1_Controller public function getFreebusytyp() { $freebusytyp_kurzbz = $this->get('freebusytyp_kurzbz'); - + if (isset($freebusytyp_kurzbz)) { $result = $this->FreebusytypModel->load($freebusytyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Freebusytyp extends APIv1_Controller { $result = $this->FreebusytypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Freebusytyp extends APIv1_Controller $this->response(); } } - + private function _validate($freebusytyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Kontakt.php b/application/controllers/api/v1/person/Kontakt.php index 00d5db5fd..fceeaaeaf 100644 --- a/application/controllers/api/v1/person/Kontakt.php +++ b/application/controllers/api/v1/person/Kontakt.php @@ -22,8 +22,16 @@ class Kontakt extends APIv1_Controller */ public function __construct() { - parent::__construct(); - + parent::__construct( + array( + 'Kontakt' => 'basis/kontakt:rw', + 'OnlyKontakt' => 'basis/kontakt:r', + 'KontaktByPersonID' => 'basis/kontakt:r', + 'OnlyKontaktByPersonID' => 'basis/kontakt:r', + 'KontaktByPersonIDKontaktTyp' => 'basis/kontakt:r' + ) + ); + // Load model PersonModel $this->load->model('person/kontakt_model', 'KontaktModel'); } @@ -31,11 +39,11 @@ class Kontakt extends APIv1_Controller public function getKontakt() { $kontakt_id = $this->get('kontakt_id'); - + if (isset($kontakt_id)) { $result = $this->KontaktModel->getWholeKontakt($kontakt_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -43,15 +51,15 @@ class Kontakt extends APIv1_Controller $this->response(); } } - + public function getOnlyKontakt() { $kontakt_id = $this->get('kontakt_id'); - + if (isset($kontakt_id)) { $result = $this->KontaktModel->load($kontakt_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -59,15 +67,15 @@ class Kontakt extends APIv1_Controller $this->response(); } } - + public function getKontaktByPersonID() { $person_id = $this->get('person_id'); - + if (isset($person_id)) { $result = $this->KontaktModel->getWholeKontakt(null, $person_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -75,15 +83,15 @@ class Kontakt extends APIv1_Controller $this->response(); } } - + public function getOnlyKontaktByPersonID() { $person_id = $this->get('person_id'); - + if (isset($person_id)) { $result = $this->KontaktModel->loadWhere(array('person_id' => $person_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -91,16 +99,16 @@ class Kontakt extends APIv1_Controller $this->response(); } } - + public function getKontaktByPersonIDKontaktTyp() { $person_id = $this->get('person_id'); $kontakttyp = $this->get('kontakttyp'); - + if (isset($person_id) && isset($kontakttyp)) { $result = $this->KontaktModel->getWholeKontakt(null, $person_id, $kontakttyp); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -108,11 +116,11 @@ class Kontakt extends APIv1_Controller $this->response(); } } - + public function postKontakt() { $kontakt = $this->post(); - + if (is_array($kontakt)) { if (isset($kontakt['kontakt_id'])) @@ -123,7 +131,7 @@ class Kontakt extends APIv1_Controller { $result = $this->KontaktModel->insert($kontakt); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -131,4 +139,4 @@ class Kontakt extends APIv1_Controller $this->response(); } } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Kontaktmedium.php b/application/controllers/api/v1/person/Kontaktmedium.php index e435bc0de..b732d6eee 100644 --- a/application/controllers/api/v1/person/Kontaktmedium.php +++ b/application/controllers/api/v1/person/Kontaktmedium.php @@ -21,11 +21,11 @@ class Kontaktmedium extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Kontaktmedium' => 'basis/kontaktmedium:rw')); // Load model KontaktmediumModel $this->load->model('person/kontaktmedium_model', 'KontaktmediumModel'); - - + + } /** @@ -34,11 +34,11 @@ class Kontaktmedium extends APIv1_Controller public function getKontaktmedium() { $kontaktmedium_kurzbz = $this->get('kontaktmedium_kurzbz'); - + if (isset($kontaktmedium_kurzbz)) { $result = $this->KontaktmediumModel->load($kontaktmedium_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Kontaktmedium extends APIv1_Controller { $result = $this->KontaktmediumModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Kontaktmedium extends APIv1_Controller $this->response(); } } - + private function _validate($kontaktmedium = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Kontakttyp.php b/application/controllers/api/v1/person/Kontakttyp.php index bceab7b36..c3d2b6e94 100644 --- a/application/controllers/api/v1/person/Kontakttyp.php +++ b/application/controllers/api/v1/person/Kontakttyp.php @@ -21,11 +21,11 @@ class Kontakttyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Kontakttyp' => 'basis/kontakttyp:rw')); // Load model KontakttypModel $this->load->model('person/kontakttyp_model', 'KontakttypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Kontakttyp extends APIv1_Controller public function getKontakttyp() { $kontakttyp = $this->get('kontakttyp'); - + if (isset($kontakttyp)) { $result = $this->KontakttypModel->load($kontakttyp); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Kontakttyp extends APIv1_Controller { $result = $this->KontakttypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Kontakttyp extends APIv1_Controller $this->response(); } } - + private function _validate($kontakttyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Notiz.php b/application/controllers/api/v1/person/Notiz.php index d4c88b4e2..29755d7d3 100644 --- a/application/controllers/api/v1/person/Notiz.php +++ b/application/controllers/api/v1/person/Notiz.php @@ -21,11 +21,11 @@ class Notiz extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Notiz' => 'basis/notiz:rw')); // Load model NotizModel $this->load->model('person/notiz_model', 'NotizModel'); - - + + } /** @@ -34,11 +34,11 @@ class Notiz extends APIv1_Controller public function getNotiz() { $notizID = $this->get('notiz_id'); - + if (isset($notizID)) { $result = $this->NotizModel->load($notizID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Notiz extends APIv1_Controller { $result = $this->NotizModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Notiz extends APIv1_Controller $this->response(); } } - + private function _validate($notiz = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Notizzuordnung.php b/application/controllers/api/v1/person/Notizzuordnung.php index d83370037..c5dab8cbe 100644 --- a/application/controllers/api/v1/person/Notizzuordnung.php +++ b/application/controllers/api/v1/person/Notizzuordnung.php @@ -21,11 +21,11 @@ class Notizzuordnung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Notizzuordnung' => 'basis/notizzuordnung:rw')); // Load model NotizzuordnungModel $this->load->model('person/notizzuordnung_model', 'NotizzuordnungModel'); - - + + } /** @@ -34,11 +34,11 @@ class Notizzuordnung extends APIv1_Controller public function getNotizzuordnung() { $notizzuordnungID = $this->get('notizzuordnung_id'); - + if (isset($notizzuordnungID)) { $result = $this->NotizzuordnungModel->load($notizzuordnungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Notizzuordnung extends APIv1_Controller { $result = $this->NotizzuordnungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Notizzuordnung extends APIv1_Controller $this->response(); } } - + private function _validate($notizzuordnung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php index c5d78ccdd..c8c95ae06 100644 --- a/application/controllers/api/v1/person/Person.php +++ b/application/controllers/api/v1/person/Person.php @@ -21,7 +21,7 @@ class Person extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Person' => 'basis/person:rw', 'CheckBewerbung' => 'basis/person:r')); // Load model PersonModel $this->load->model('person/person_model', 'PersonModel'); } @@ -34,7 +34,7 @@ class Person extends APIv1_Controller $person_id = $this->get('person_id'); $code = $this->get('code'); $email = $this->get('email'); - + if (isset($code) || isset($email) || isset($person_id)) { if (isset($code) && isset($email)) @@ -44,7 +44,7 @@ class Person extends APIv1_Controller else { $parametersArray = array(); - + if (isset($code)) { $parametersArray['zugangscode'] = $code; @@ -53,10 +53,10 @@ class Person extends APIv1_Controller { $parametersArray['person_id'] = $person_id; } - + $result = $this->PersonModel->loadWhere($parametersArray); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -64,7 +64,7 @@ class Person extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -72,11 +72,11 @@ class Person extends APIv1_Controller { $email = $this->get('email'); $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); - + if (isset($email)) { $result = $this->PersonModel->checkBewerbung($email, $studiensemester_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -92,7 +92,7 @@ class Person extends APIv1_Controller { $person = $this->post(); $validation = $this->_validate($person); - + if (isSuccess($validation)) { if(isset($person['person_id']) && !(is_null($person['person_id'])) && ($person['person_id'] != '')) @@ -103,7 +103,7 @@ class Person extends APIv1_Controller { $result = $this->PersonModel->insert($person); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -111,7 +111,7 @@ class Person extends APIv1_Controller $this->response($validation, REST_Controller::HTTP_OK); } } - + private function _validate($person) { // If $person is consistent @@ -119,7 +119,7 @@ class Person extends APIv1_Controller { return error('Any parameters posted'); } - + // Trim all the values foreach($person as $key => $value) { @@ -128,7 +128,7 @@ class Person extends APIv1_Controller $person[$key] = trim($value); } } - + if (isset($person['sprache']) && mb_strlen($person['sprache']) > 16) { return error('Sprache darf nicht laenger als 16 Zeichen sein'); @@ -213,7 +213,7 @@ class Person extends APIv1_Controller { return error('Geschlecht muss w, m oder u sein!'); } - + if (isset($person['svnr'])) { if ($person['svnr'] != '' && mb_strlen($person['svnr']) != 16 @@ -240,7 +240,7 @@ class Person extends APIv1_Controller { return error('SVNR ist ungueltig'); } - + if (mb_strlen($person['svnr']) == 12) { $last = substr($person['svnr'], 10, 12); @@ -250,7 +250,7 @@ class Person extends APIv1_Controller } } } - + //Pruefen ob das Geburtsdatum mit der SVNR uebereinstimmt. if (isset($person['gebdatum']) && $person['svnr'] != '' && $person['gebdatum'] != '') { @@ -261,7 +261,7 @@ class Person extends APIv1_Controller } } } - + return success('Input data are valid'); } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Aktivitaet.php b/application/controllers/api/v1/project/Aktivitaet.php index 878738804..7aa647058 100644 --- a/application/controllers/api/v1/project/Aktivitaet.php +++ b/application/controllers/api/v1/project/Aktivitaet.php @@ -21,11 +21,11 @@ class Aktivitaet extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aktivitaet' => 'basis/aktivitaet:rw')); // Load model AktivitaetModel $this->load->model('project/aktivitaet_model', 'AktivitaetModel'); - - + + } /** @@ -34,11 +34,11 @@ class Aktivitaet extends APIv1_Controller public function getAktivitaet() { $aktivitaet_kurzbz = $this->get('aktivitaet_kurzbz'); - + if (isset($aktivitaet_kurzbz)) { $result = $this->AktivitaetModel->load($aktivitaet_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Aktivitaet extends APIv1_Controller { $result = $this->AktivitaetModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Aktivitaet extends APIv1_Controller $this->response(); } } - + private function _validate($aktivitaet = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Aufwandstyp.php b/application/controllers/api/v1/project/Aufwandstyp.php index f9d9ce58c..96be6ab55 100644 --- a/application/controllers/api/v1/project/Aufwandstyp.php +++ b/application/controllers/api/v1/project/Aufwandstyp.php @@ -21,11 +21,11 @@ class Aufwandstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Aufwandstyp' => 'basis/aufwandstyp:rw')); // Load model AufwandstypModel $this->load->model('project/aufwandstyp_model', 'AufwandstypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Aufwandstyp extends APIv1_Controller public function getAufwandstyp() { $aufwandstyp_kurzbz = $this->get('aufwandstyp_kurzbz'); - + if (isset($aufwandstyp_kurzbz)) { $result = $this->AufwandstypModel->load($aufwandstyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Aufwandstyp extends APIv1_Controller { $result = $this->AufwandstypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Aufwandstyp extends APIv1_Controller $this->response(); } } - + private function _validate($aufwandstyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Projekt.php b/application/controllers/api/v1/project/Projekt.php index 6340ca81b..64533f36f 100644 --- a/application/controllers/api/v1/project/Projekt.php +++ b/application/controllers/api/v1/project/Projekt.php @@ -21,11 +21,11 @@ class Projekt extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projekt' => 'basis/projekt:rw')); // Load model ProjektModel $this->load->model('project/projekt_model', 'ProjektModel'); - - + + } /** @@ -34,11 +34,11 @@ class Projekt extends APIv1_Controller public function getProjekt() { $projekt_kurzbz = $this->get('projekt_kurzbz'); - + if (isset($projekt_kurzbz)) { $result = $this->ProjektModel->load($projekt_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Projekt extends APIv1_Controller { $result = $this->ProjektModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Projekt extends APIv1_Controller $this->response(); } } - + private function _validate($projekt = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Projekt_ressource.php b/application/controllers/api/v1/project/Projekt_ressource.php index 6ff0748f5..2869f935a 100644 --- a/application/controllers/api/v1/project/Projekt_ressource.php +++ b/application/controllers/api/v1/project/Projekt_ressource.php @@ -21,11 +21,11 @@ class Projekt_ressource extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projekt_ressource' => 'basis/projekt_ressource:rw')); // Load model Projekt_ressourceModel $this->load->model('project/projekt_ressource_model', 'Projekt_ressourceModel'); - - + + } /** @@ -34,11 +34,11 @@ class Projekt_ressource extends APIv1_Controller public function getProjekt_ressource() { $projekt_ressourceID = $this->get('projekt_ressource_id'); - + if (isset($projekt_ressourceID)) { $result = $this->Projekt_ressourceModel->load($projekt_ressourceID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Projekt_ressource extends APIv1_Controller { $result = $this->Projekt_ressourceModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Projekt_ressource extends APIv1_Controller $this->response(); } } - + private function _validate($projekt_ressource = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Projektphase.php b/application/controllers/api/v1/project/Projektphase.php index b59a0aed3..c48893948 100644 --- a/application/controllers/api/v1/project/Projektphase.php +++ b/application/controllers/api/v1/project/Projektphase.php @@ -21,11 +21,11 @@ class Projektphase extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projektphase' => 'basis/projektphase:rw')); // Load model ProjektphaseModel $this->load->model('project/projektphase_model', 'ProjektphaseModel'); - - + + } /** @@ -34,11 +34,11 @@ class Projektphase extends APIv1_Controller public function getProjektphase() { $projektphaseID = $this->get('projektphase_id'); - + if (isset($projektphaseID)) { $result = $this->ProjektphaseModel->load($projektphaseID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Projektphase extends APIv1_Controller { $result = $this->ProjektphaseModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Projektphase extends APIv1_Controller $this->response(); } } - + private function _validate($projektphase = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Projekttask.php b/application/controllers/api/v1/project/Projekttask.php index ae89c45b3..5793c85a1 100644 --- a/application/controllers/api/v1/project/Projekttask.php +++ b/application/controllers/api/v1/project/Projekttask.php @@ -21,11 +21,11 @@ class Projekttask extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Projekttask' => 'basis/projekttask:rw')); // Load model ProjekttaskModel $this->load->model('project/projekttask_model', 'ProjekttaskModel'); - - + + } /** @@ -34,11 +34,11 @@ class Projekttask extends APIv1_Controller public function getProjekttask() { $projekttaskID = $this->get('projekttask_id'); - + if (isset($projekttaskID)) { $result = $this->ProjekttaskModel->load($projekttaskID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Projekttask extends APIv1_Controller { $result = $this->ProjekttaskModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Projekttask extends APIv1_Controller $this->response(); } } - + private function _validate($projekttask = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Ressource.php b/application/controllers/api/v1/project/Ressource.php index 0e70c86ac..fddf77c57 100644 --- a/application/controllers/api/v1/project/Ressource.php +++ b/application/controllers/api/v1/project/Ressource.php @@ -21,11 +21,11 @@ class Ressource extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ressource' => 'basis/ressource:rw')); // Load model RessourceModel $this->load->model('project/ressource_model', 'RessourceModel'); - - + + } /** @@ -34,11 +34,11 @@ class Ressource extends APIv1_Controller public function getRessource() { $ressourceID = $this->get('ressource_id'); - + if (isset($ressourceID)) { $result = $this->RessourceModel->load($ressourceID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Ressource extends APIv1_Controller { $result = $this->RessourceModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Ressource extends APIv1_Controller $this->response(); } } - + private function _validate($ressource = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/project/Scrumsprint.php b/application/controllers/api/v1/project/Scrumsprint.php index db81c319f..ff0e75b09 100644 --- a/application/controllers/api/v1/project/Scrumsprint.php +++ b/application/controllers/api/v1/project/Scrumsprint.php @@ -21,11 +21,11 @@ class Scrumsprint extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Scrumsprint' => 'basis/scrumsprint:rw')); // Load model ScrumsprintModel $this->load->model('project/scrumsprint_model', 'ScrumsprintModel'); - - + + } /** @@ -34,11 +34,11 @@ class Scrumsprint extends APIv1_Controller public function getScrumsprint() { $scrumsprintID = $this->get('scrumsprint_id'); - + if (isset($scrumsprintID)) { $result = $this->ScrumsprintModel->load($scrumsprintID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Scrumsprint extends APIv1_Controller { $result = $this->ScrumsprintModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Scrumsprint extends APIv1_Controller $this->response(); } } - + private function _validate($scrumsprint = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Betriebsmittel.php b/application/controllers/api/v1/ressource/Betriebsmittel.php index 2d1da9d22..63e003cfd 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittel.php +++ b/application/controllers/api/v1/ressource/Betriebsmittel.php @@ -21,11 +21,11 @@ class Betriebsmittel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Betriebsmittel' => 'basis/betriebsmittel:rw')); // Load model BetriebsmittelModel $this->load->model('ressource/betriebsmittel_model', 'BetriebsmittelModel'); - - + + } /** @@ -34,11 +34,11 @@ class Betriebsmittel extends APIv1_Controller public function getBetriebsmittel() { $betriebsmittelID = $this->get('betriebsmittel_id'); - + if (isset($betriebsmittelID)) { $result = $this->BetriebsmittelModel->load($betriebsmittelID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Betriebsmittel extends APIv1_Controller { $result = $this->BetriebsmittelModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Betriebsmittel extends APIv1_Controller $this->response(); } } - + private function _validate($betriebsmittel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php index 8ed7a9a7d..71b5af77a 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php +++ b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php @@ -21,11 +21,11 @@ class Betriebsmittelperson2 extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Betriebsmittelperson' => 'basis/betriebsmittelperson:rw')); // Load model BetriebsmittelpersonModel $this->load->model('ressource/betriebsmittelperson_model', 'BetriebsmittelpersonModel'); - - + + } /** @@ -34,11 +34,11 @@ class Betriebsmittelperson2 extends APIv1_Controller public function getBetriebsmittelperson() { $betriebsmittelpersonID = $this->get('betriebsmittelperson_id'); - + if (isset($betriebsmittelpersonID)) { $result = $this->BetriebsmittelpersonModel->load($betriebsmittelpersonID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Betriebsmittelperson2 extends APIv1_Controller { $result = $this->BetriebsmittelpersonModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Betriebsmittelperson2 extends APIv1_Controller $this->response(); } } - + private function _validate($betriebsmittelperson = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php index c25c6991e..8dcfad8c6 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php +++ b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php @@ -21,11 +21,11 @@ class Betriebsmittelstatus extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Betriebsmittelstatus' => 'basis/betriebsmittelstatus:rw')); // Load model BetriebsmittelstatusModel $this->load->model('ressource/betriebsmittelstatus_model', 'BetriebsmittelstatusModel'); - - + + } /** @@ -34,11 +34,11 @@ class Betriebsmittelstatus extends APIv1_Controller public function getBetriebsmittelstatus() { $betriebsmittelstatus_kurzbz = $this->get('betriebsmittelstatus_kurzbz'); - + if (isset($betriebsmittelstatus_kurzbz)) { $result = $this->BetriebsmittelstatusModel->load($betriebsmittelstatus_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Betriebsmittelstatus extends APIv1_Controller { $result = $this->BetriebsmittelstatusModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Betriebsmittelstatus extends APIv1_Controller $this->response(); } } - + private function _validate($betriebsmittelstatus = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php index 1aef7153b..9902ec032 100644 --- a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php +++ b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php @@ -21,11 +21,11 @@ class Betriebsmitteltyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Betriebsmitteltyp' => 'basis/betriebsmitteltyp:rw')); // Load model BetriebsmitteltypModel $this->load->model('ressource/betriebsmitteltyp_model', 'BetriebsmitteltypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Betriebsmitteltyp extends APIv1_Controller public function getBetriebsmitteltyp() { $betriebsmitteltyp = $this->get('betriebsmitteltyp'); - + if (isset($betriebsmitteltyp)) { $result = $this->BetriebsmitteltypModel->load($betriebsmitteltyp); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Betriebsmitteltyp extends APIv1_Controller { $result = $this->BetriebsmitteltypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Betriebsmitteltyp extends APIv1_Controller $this->response(); } } - + private function _validate($betriebsmitteltyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Coodle.php b/application/controllers/api/v1/ressource/Coodle.php index 3799aae26..bd7cfcf7f 100644 --- a/application/controllers/api/v1/ressource/Coodle.php +++ b/application/controllers/api/v1/ressource/Coodle.php @@ -21,11 +21,11 @@ class Coodle extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Coodle' => 'basis/coodle:rw')); // Load model CoodleModel $this->load->model('ressource/coodle_model', 'CoodleModel'); - - + + } /** @@ -34,11 +34,11 @@ class Coodle extends APIv1_Controller public function getCoodle() { $coodleID = $this->get('coodle_id'); - + if (isset($coodleID)) { $result = $this->CoodleModel->load($coodleID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Coodle extends APIv1_Controller { $result = $this->CoodleModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Coodle extends APIv1_Controller $this->response(); } } - + private function _validate($coodle = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Erreichbarkeit.php b/application/controllers/api/v1/ressource/Erreichbarkeit.php index 545501a77..291451faf 100644 --- a/application/controllers/api/v1/ressource/Erreichbarkeit.php +++ b/application/controllers/api/v1/ressource/Erreichbarkeit.php @@ -21,11 +21,11 @@ class Erreichbarkeit extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Erreichbarkeit' => 'basis/erreichbarkeit:rw')); // Load model ErreichbarkeitModel $this->load->model('ressource/erreichbarkeit_model', 'ErreichbarkeitModel'); - - + + } /** @@ -34,11 +34,11 @@ class Erreichbarkeit extends APIv1_Controller public function getErreichbarkeit() { $erreichbarkeit_kurzbz = $this->get('erreichbarkeit_kurzbz'); - + if (isset($erreichbarkeit_kurzbz)) { $result = $this->ErreichbarkeitModel->load($erreichbarkeit_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Erreichbarkeit extends APIv1_Controller { $result = $this->ErreichbarkeitModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Erreichbarkeit extends APIv1_Controller $this->response(); } } - + private function _validate($erreichbarkeit = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Firma.php b/application/controllers/api/v1/ressource/Firma.php index 5bcfb1173..159d63642 100644 --- a/application/controllers/api/v1/ressource/Firma.php +++ b/application/controllers/api/v1/ressource/Firma.php @@ -21,11 +21,11 @@ class Firma extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Firma' => 'basis/firma:rw')); // Load model FirmaModel $this->load->model('ressource/firma_model', 'FirmaModel'); - - + + } /** @@ -34,11 +34,11 @@ class Firma extends APIv1_Controller public function getFirma() { $firmaID = $this->get('firma_id'); - + if (isset($firmaID)) { $result = $this->FirmaModel->load($firmaID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Firma extends APIv1_Controller { $result = $this->FirmaModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Firma extends APIv1_Controller $this->response(); } } - + private function _validate($firma = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Firmatag.php b/application/controllers/api/v1/ressource/Firmatag.php index c2c4f7533..b9df31896 100644 --- a/application/controllers/api/v1/ressource/Firmatag.php +++ b/application/controllers/api/v1/ressource/Firmatag.php @@ -21,11 +21,11 @@ class Firmatag extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Firmatag' => 'basis/firmatag:rw')); // Load model FirmatagModel $this->load->model('ressource/firmatag_model', 'FirmatagModel'); - - + + } /** @@ -35,11 +35,11 @@ class Firmatag extends APIv1_Controller { $tag = $this->get('tag'); $firma_id = $this->get('firma_id'); - + if (isset($tag) && isset($firma_id)) { $result = $this->FirmatagModel->load(array($tag, $firma_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Firmatag extends APIv1_Controller { $result = $this->FirmatagModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Firmatag extends APIv1_Controller $this->response(); } } - + private function _validate($firmatag = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Firmentyp.php b/application/controllers/api/v1/ressource/Firmentyp.php index c5c2d6fed..2d13ae845 100644 --- a/application/controllers/api/v1/ressource/Firmentyp.php +++ b/application/controllers/api/v1/ressource/Firmentyp.php @@ -21,11 +21,11 @@ class Firmentyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Firmentyp' => 'basis/firmentyp:rw')); // Load model FirmentypModel $this->load->model('ressource/firmentyp_model', 'FirmentypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Firmentyp extends APIv1_Controller public function getFirmentyp() { $firmentyp_kurzbz = $this->get('firmentyp_kurzbz'); - + if (isset($firmentyp_kurzbz)) { $result = $this->FirmentypModel->load($firmentyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Firmentyp extends APIv1_Controller { $result = $this->FirmentypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Firmentyp extends APIv1_Controller $this->response(); } } - + private function _validate($firmentyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Funktion.php b/application/controllers/api/v1/ressource/Funktion.php index 191394da8..0ff059d2a 100644 --- a/application/controllers/api/v1/ressource/Funktion.php +++ b/application/controllers/api/v1/ressource/Funktion.php @@ -21,11 +21,11 @@ class Funktion extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Funktion' => 'basis/funktion:rw')); // Load model FunktionModel $this->load->model('ressource/funktion_model', 'FunktionModel'); - - + + } /** @@ -34,11 +34,11 @@ class Funktion extends APIv1_Controller public function getFunktion() { $funktion_kurzbz = $this->get('funktion_kurzbz'); - + if (isset($funktion_kurzbz)) { $result = $this->FunktionModel->load($funktion_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Funktion extends APIv1_Controller { $result = $this->FunktionModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Funktion extends APIv1_Controller $this->response(); } } - + private function _validate($funktion = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Lehrmittel.php b/application/controllers/api/v1/ressource/Lehrmittel.php index b28c7eb15..36d0d7a2f 100644 --- a/application/controllers/api/v1/ressource/Lehrmittel.php +++ b/application/controllers/api/v1/ressource/Lehrmittel.php @@ -21,11 +21,11 @@ class Lehrmittel extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Lehrmittel' => 'basis/lehrmittel:rw')); // Load model LehrmittelModel $this->load->model('ressource/lehrmittel_model', 'LehrmittelModel'); - - + + } /** @@ -34,11 +34,11 @@ class Lehrmittel extends APIv1_Controller public function getLehrmittel() { $lehrmittel_kurzbz = $this->get('lehrmittel_kurzbz'); - + if (isset($lehrmittel_kurzbz)) { $result = $this->LehrmittelModel->load($lehrmittel_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Lehrmittel extends APIv1_Controller { $result = $this->LehrmittelModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Lehrmittel extends APIv1_Controller $this->response(); } } - + private function _validate($lehrmittel = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Mitarbeiter.php b/application/controllers/api/v1/ressource/Mitarbeiter.php index e550d005b..89ead5681 100644 --- a/application/controllers/api/v1/ressource/Mitarbeiter.php +++ b/application/controllers/api/v1/ressource/Mitarbeiter.php @@ -21,11 +21,11 @@ class Mitarbeiter extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Mitarbeiter' => 'basis/mitarbeiter:rw')); // Load model MitarbeiterModel $this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel'); - - + + } /** @@ -34,11 +34,11 @@ class Mitarbeiter extends APIv1_Controller public function getMitarbeiter() { $mitarbeiter_uid = $this->get('mitarbeiter_uid'); - + if (isset($mitarbeiter_uid)) { $result = $this->MitarbeiterModel->load($mitarbeiter_uid); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Mitarbeiter extends APIv1_Controller { $result = $this->MitarbeiterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Mitarbeiter extends APIv1_Controller $this->response(); } } - + private function _validate($mitarbeiter = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Ort.php b/application/controllers/api/v1/ressource/Ort.php index bdc695ab0..1610c7d0f 100644 --- a/application/controllers/api/v1/ressource/Ort.php +++ b/application/controllers/api/v1/ressource/Ort.php @@ -21,7 +21,7 @@ class Ort extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ort' => 'basis/ort:rw', 'All' => 'basis/ort:r')); // Load model OrtModel $this->load->model("ressource/ort_model", "OrtModel"); } @@ -32,11 +32,11 @@ class Ort extends APIv1_Controller public function getOrt() { $ort_kurzbz = $this->get("ort_kurzbz"); - + if (isset($ort_kurzbz)) { $result = $this->OrtModel->load(trim($ort_kurzbz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -44,7 +44,7 @@ class Ort extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -60,7 +60,7 @@ class Ort extends APIv1_Controller { $result = $this->OrtModel->load(); } - + $this->response($result, REST_Controller::HTTP_OK); } @@ -79,7 +79,7 @@ class Ort extends APIv1_Controller { $result = $this->OrtModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -87,9 +87,9 @@ class Ort extends APIv1_Controller $this->response(); } } - + private function _validate($ort = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Ortraumtyp.php b/application/controllers/api/v1/ressource/Ortraumtyp.php index 7452805ee..cbf9c3d9b 100644 --- a/application/controllers/api/v1/ressource/Ortraumtyp.php +++ b/application/controllers/api/v1/ressource/Ortraumtyp.php @@ -21,11 +21,11 @@ class Ortraumtyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ortraumtyp' => 'basis/ortraumtyp:rw')); // Load model OrtraumtypModel $this->load->model('ressource/ortraumtyp_model', 'OrtraumtypModel'); - - + + } /** @@ -35,11 +35,11 @@ class Ortraumtyp extends APIv1_Controller { $hierarchie = $this->get('hierarchie'); $ort_kurzbz = $this->get('ort_kurzbz'); - + if (isset($hierarchie) && isset($ort_kurzbz)) { $result = $this->OrtraumtypModel->load(array($hierarchie, $ort_kurzbz)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -63,7 +63,7 @@ class Ortraumtyp extends APIv1_Controller { $result = $this->OrtraumtypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -71,9 +71,9 @@ class Ortraumtyp extends APIv1_Controller $this->response(); } } - + private function _validate($ortraumtyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Personfunktionstandort.php b/application/controllers/api/v1/ressource/Personfunktionstandort.php index 7d75b80ce..1c7551984 100644 --- a/application/controllers/api/v1/ressource/Personfunktionstandort.php +++ b/application/controllers/api/v1/ressource/Personfunktionstandort.php @@ -21,11 +21,11 @@ class Personfunktionstandort extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Personfunktionstandort' => 'basis/personfunktionstandort:rw')); // Load model PersonfunktionstandortModel $this->load->model('ressource/personfunktionstandort_model', 'PersonfunktionstandortModel'); - - + + } /** @@ -34,11 +34,11 @@ class Personfunktionstandort extends APIv1_Controller public function getPersonfunktionstandort() { $personfunktionstandortID = $this->get('personfunktionstandort_id'); - + if (isset($personfunktionstandortID)) { $result = $this->PersonfunktionstandortModel->load($personfunktionstandortID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Personfunktionstandort extends APIv1_Controller { $result = $this->PersonfunktionstandortModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Personfunktionstandort extends APIv1_Controller $this->response(); } } - + private function _validate($personfunktionstandort = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Raumtyp.php b/application/controllers/api/v1/ressource/Raumtyp.php index 10d05e108..71b7bf5d8 100644 --- a/application/controllers/api/v1/ressource/Raumtyp.php +++ b/application/controllers/api/v1/ressource/Raumtyp.php @@ -21,11 +21,11 @@ class Raumtyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Raumtyp' => 'basis/raumtyp:rw')); // Load model RaumtypModel $this->load->model('ressource/raumtyp_model', 'RaumtypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Raumtyp extends APIv1_Controller public function getRaumtyp() { $raumtyp_kurzbz = $this->get('raumtyp_kurzbz'); - + if (isset($raumtyp_kurzbz)) { $result = $this->RaumtypModel->load($raumtyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Raumtyp extends APIv1_Controller { $result = $this->RaumtypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Raumtyp extends APIv1_Controller $this->response(); } } - + private function _validate($raumtyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Reservierung.php b/application/controllers/api/v1/ressource/Reservierung.php index 48370708d..633f61036 100644 --- a/application/controllers/api/v1/ressource/Reservierung.php +++ b/application/controllers/api/v1/ressource/Reservierung.php @@ -21,11 +21,11 @@ class Reservierung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Reservierung' => 'basis/reservierung:rw')); // Load model ReservierungModel $this->load->model('ressource/reservierung_model', 'ReservierungModel'); - - + + } /** @@ -34,11 +34,11 @@ class Reservierung extends APIv1_Controller public function getReservierung() { $reservierungID = $this->get('reservierung_id'); - + if (isset($reservierungID)) { $result = $this->ReservierungModel->load($reservierungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Reservierung extends APIv1_Controller { $result = $this->ReservierungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Reservierung extends APIv1_Controller $this->response(); } } - + private function _validate($reservierung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Stunde.php b/application/controllers/api/v1/ressource/Stunde.php index 23711453a..5d2f37049 100644 --- a/application/controllers/api/v1/ressource/Stunde.php +++ b/application/controllers/api/v1/ressource/Stunde.php @@ -21,11 +21,11 @@ class Stunde extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Stunde' => 'basis/stunde:rw')); // Load model StundeModel $this->load->model('ressource/stunde_model', 'StundeModel'); - - + + } /** @@ -34,11 +34,11 @@ class Stunde extends APIv1_Controller public function getStunde() { $stunde = $this->get('stunde'); - + if (isset($stunde)) { $result = $this->StundeModel->load($stunde); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Stunde extends APIv1_Controller { $result = $this->StundeModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Stunde extends APIv1_Controller $this->response(); } } - + private function _validate($stunde = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Stundenplan.php b/application/controllers/api/v1/ressource/Stundenplan.php index 37932cf1f..2d4b3c705 100644 --- a/application/controllers/api/v1/ressource/Stundenplan.php +++ b/application/controllers/api/v1/ressource/Stundenplan.php @@ -21,11 +21,11 @@ class Stundenplan extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Stundenplan' => 'basis/stundenplan:rw')); // Load model StundenplanModel $this->load->model('ressource/stundenplan_model', 'StundenplanModel'); - - + + } /** @@ -34,11 +34,11 @@ class Stundenplan extends APIv1_Controller public function getStundenplan() { $stundenplanID = $this->get('stundenplan_id'); - + if (isset($stundenplanID)) { $result = $this->StundenplanModel->load($stundenplanID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Stundenplan extends APIv1_Controller { $result = $this->StundenplanModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Stundenplan extends APIv1_Controller $this->response(); } } - + private function _validate($stundenplan = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Stundenplandev.php b/application/controllers/api/v1/ressource/Stundenplandev.php index 429999321..385f2bf9e 100644 --- a/application/controllers/api/v1/ressource/Stundenplandev.php +++ b/application/controllers/api/v1/ressource/Stundenplandev.php @@ -21,11 +21,11 @@ class Stundenplandev extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Stundenplandev' => 'basis/stundenplandev:rw')); // Load model StundenplandevModel $this->load->model('ressource/stundenplandev_model', 'StundenplandevModel'); - - + + } /** @@ -34,11 +34,11 @@ class Stundenplandev extends APIv1_Controller public function getStundenplandev() { $stundenplandevID = $this->get('stundenplandev_id'); - + if (isset($stundenplandevID)) { $result = $this->StundenplandevModel->load($stundenplandevID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Stundenplandev extends APIv1_Controller { $result = $this->StundenplandevModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Stundenplandev extends APIv1_Controller $this->response(); } } - + private function _validate($stundenplandev = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php index 367d7e12e..8c30390e6 100644 --- a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php +++ b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php @@ -21,11 +21,11 @@ class Zeitaufzeichnung extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeitaufzeichnung' => 'basis/zeitaufzeichnung:rw')); // Load model ZeitaufzeichnungModel $this->load->model('ressource/zeitaufzeichnung_model', 'ZeitaufzeichnungModel'); - - + + } /** @@ -34,11 +34,11 @@ class Zeitaufzeichnung extends APIv1_Controller public function getZeitaufzeichnung() { $zeitaufzeichnungID = $this->get('zeitaufzeichnung_id'); - + if (isset($zeitaufzeichnungID)) { $result = $this->ZeitaufzeichnungModel->load($zeitaufzeichnungID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Zeitaufzeichnung extends APIv1_Controller { $result = $this->ZeitaufzeichnungModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Zeitaufzeichnung extends APIv1_Controller $this->response(); } } - + private function _validate($zeitaufzeichnung = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Zeitfenster.php b/application/controllers/api/v1/ressource/Zeitfenster.php index f65b3ad7c..e180d0d75 100644 --- a/application/controllers/api/v1/ressource/Zeitfenster.php +++ b/application/controllers/api/v1/ressource/Zeitfenster.php @@ -21,11 +21,11 @@ class Zeitfenster extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeitfenster' => 'basis/zeitfenster:rw')); // Load model ZeitfensterModel $this->load->model('ressource/zeitfenster_model', 'ZeitfensterModel'); - - + + } /** @@ -37,11 +37,11 @@ class Zeitfenster extends APIv1_Controller $studiengang_kz = $this->get('studiengang_kz'); $ort_kurzbz = $this->get('ort_kurzbz'); $stunde = $this->get('stunde'); - + if (isset($wochentag) && isset($studiengang_kz) && isset($ort_kurzbz) && isset($stunde)) { $result = $this->ZeitfensterModel->load(array($wochentag, $studiengang_kz, $ort_kurzbz, $stunde)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -65,14 +65,14 @@ class Zeitfenster extends APIv1_Controller $this->post()['ort_kurzbz'], $this->post()['stunde'] ); - + $result = $this->ZeitfensterModel->update($pksArray, $this->post()); } else { $result = $this->ZeitfensterModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -80,9 +80,9 @@ class Zeitfenster extends APIv1_Controller $this->response(); } } - + private function _validate($zeitfenster = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Zeitsperre.php b/application/controllers/api/v1/ressource/Zeitsperre.php index c0d9c0cbc..626a88d79 100644 --- a/application/controllers/api/v1/ressource/Zeitsperre.php +++ b/application/controllers/api/v1/ressource/Zeitsperre.php @@ -21,11 +21,11 @@ class Zeitsperre extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeitsperre' => 'basis/zeitsperre:rw')); // Load model ZeitsperreModel $this->load->model('ressource/zeitsperre_model', 'ZeitsperreModel'); - - + + } /** @@ -34,11 +34,11 @@ class Zeitsperre extends APIv1_Controller public function getZeitsperre() { $zeitsperreID = $this->get('zeitsperre_id'); - + if (isset($zeitsperreID)) { $result = $this->ZeitsperreModel->load($zeitsperreID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Zeitsperre extends APIv1_Controller { $result = $this->ZeitsperreModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Zeitsperre extends APIv1_Controller $this->response(); } } - + private function _validate($zeitsperre = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Zeitsperretyp.php b/application/controllers/api/v1/ressource/Zeitsperretyp.php index b131f81e7..c70a9b2f4 100644 --- a/application/controllers/api/v1/ressource/Zeitsperretyp.php +++ b/application/controllers/api/v1/ressource/Zeitsperretyp.php @@ -21,11 +21,11 @@ class Zeitsperretyp extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeitsperretyp' => 'basis/zeitsperretyp:rw')); // Load model ZeitsperretypModel $this->load->model('ressource/zeitsperretyp_model', 'ZeitsperretypModel'); - - + + } /** @@ -34,11 +34,11 @@ class Zeitsperretyp extends APIv1_Controller public function getZeitsperretyp() { $zeitsperretyp_kurzbz = $this->get('zeitsperretyp_kurzbz'); - + if (isset($zeitsperretyp_kurzbz)) { $result = $this->ZeitsperretypModel->load($zeitsperretyp_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Zeitsperretyp extends APIv1_Controller { $result = $this->ZeitsperretypModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Zeitsperretyp extends APIv1_Controller $this->response(); } } - + private function _validate($zeitsperretyp = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/ressource/Zeitwunsch.php b/application/controllers/api/v1/ressource/Zeitwunsch.php index ed479ff86..8d9646edc 100644 --- a/application/controllers/api/v1/ressource/Zeitwunsch.php +++ b/application/controllers/api/v1/ressource/Zeitwunsch.php @@ -21,11 +21,11 @@ class Zeitwunsch extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Zeitwunsch' => 'basis/zeitwunsch:rw')); // Load model ZeitwunschModel $this->load->model('ressource/zeitwunsch_model', 'ZeitwunschModel'); - - + + } /** @@ -36,11 +36,11 @@ class Zeitwunsch extends APIv1_Controller $tag = $this->get('tag'); $mitarbeiter_uid = $this->get('mitarbeiter_uid'); $stunde = $this->get('stunde'); - + if (isset($tag) && isset($mitarbeiter_uid) && isset($stunde)) { $result = $this->ZeitwunschModel->load(array($tag, $mitarbeiter_uid, $stunde)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,14 +62,14 @@ class Zeitwunsch extends APIv1_Controller $this->post()['mitarbeiter_uid'], $this->post()['stunde'] ); - + $result = $this->ZeitwunschModel->update($pksArray, $this->post()); } else { $result = $this->ZeitwunschModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -77,9 +77,9 @@ class Zeitwunsch extends APIv1_Controller $this->response(); } } - + private function _validate($zeitwunsch = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Appdaten.php b/application/controllers/api/v1/system/Appdaten.php index 6c71a8825..3395ec9b6 100644 --- a/application/controllers/api/v1/system/Appdaten.php +++ b/application/controllers/api/v1/system/Appdaten.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Benutzerrolle.php b/application/controllers/api/v1/system/Benutzerrolle.php index b34551746..99ec3d79e 100644 --- a/application/controllers/api/v1/system/Benutzerrolle.php +++ b/application/controllers/api/v1/system/Benutzerrolle.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Berechtigung.php b/application/controllers/api/v1/system/Berechtigung.php index 52f9cde59..e94bf30f3 100644 --- a/application/controllers/api/v1/system/Berechtigung.php +++ b/application/controllers/api/v1/system/Berechtigung.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/CallerLibrary.php b/application/controllers/api/v1/system/CallerLibrary.php index 42f2e785e..903973b8c 100644 --- a/application/controllers/api/v1/system/CallerLibrary.php +++ b/application/controllers/api/v1/system/CallerLibrary.php @@ -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); } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/CallerModel.php b/application/controllers/api/v1/system/CallerModel.php index 9c3ee8815..3ea1dc326 100644 --- a/application/controllers/api/v1/system/CallerModel.php +++ b/application/controllers/api/v1/system/CallerModel.php @@ -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); } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Cronjob.php b/application/controllers/api/v1/system/Cronjob.php index 3f625389a..4b3bcba82 100644 --- a/application/controllers/api/v1/system/Cronjob.php +++ b/application/controllers/api/v1/system/Cronjob.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Filter.php b/application/controllers/api/v1/system/Filter.php index b6e3027bd..bc217d385 100644 --- a/application/controllers/api/v1/system/Filter.php +++ b/application/controllers/api/v1/system/Filter.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Log.php b/application/controllers/api/v1/system/Log.php index 653731f02..c270922c5 100644 --- a/application/controllers/api/v1/system/Log.php +++ b/application/controllers/api/v1/system/Log.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Message.php b/application/controllers/api/v1/system/Message.php index 0f3f79855..be87526ed 100644 --- a/application/controllers/api/v1/system/Message.php +++ b/application/controllers/api/v1/system/Message.php @@ -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'); } diff --git a/application/controllers/api/v1/system/Phrase.php b/application/controllers/api/v1/system/Phrase.php index 31decf540..ca5620bf8 100644 --- a/application/controllers/api/v1/system/Phrase.php +++ b/application/controllers/api/v1/system/Phrase.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Rolle.php b/application/controllers/api/v1/system/Rolle.php index 9bf3a229e..ba257145f 100644 --- a/application/controllers/api/v1/system/Rolle.php +++ b/application/controllers/api/v1/system/Rolle.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Rolleberechtigung.php b/application/controllers/api/v1/system/Rolleberechtigung.php index f4c0b11a5..3838dc6de 100644 --- a/application/controllers/api/v1/system/Rolleberechtigung.php +++ b/application/controllers/api/v1/system/Rolleberechtigung.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Server.php b/application/controllers/api/v1/system/Server.php index 8bd2bffa1..0f3c76655 100644 --- a/application/controllers/api/v1/system/Server.php +++ b/application/controllers/api/v1/system/Server.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Sprache2.php b/application/controllers/api/v1/system/Sprache2.php index 86304fc70..3a3b7e6de 100644 --- a/application/controllers/api/v1/system/Sprache2.php +++ b/application/controllers/api/v1/system/Sprache2.php @@ -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; diff --git a/application/controllers/api/v1/system/Tag.php b/application/controllers/api/v1/system/Tag.php index 12ce7b3ac..2bcb2dec2 100644 --- a/application/controllers/api/v1/system/Tag.php +++ b/application/controllers/api/v1/system/Tag.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/UDF.php b/application/controllers/api/v1/system/UDF.php index 252332cce..57d22600c 100644 --- a/application/controllers/api/v1/system/UDF.php +++ b/application/controllers/api/v1/system/UDF.php @@ -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 } } } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Variable.php b/application/controllers/api/v1/system/Variable.php index d97fefdf7..8a4e196dc 100644 --- a/application/controllers/api/v1/system/Variable.php +++ b/application/controllers/api/v1/system/Variable.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Vorlage.php b/application/controllers/api/v1/system/Vorlage.php index 304471971..48a73ac4f 100644 --- a/application/controllers/api/v1/system/Vorlage.php +++ b/application/controllers/api/v1/system/Vorlage.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Vorlagestudiengang.php b/application/controllers/api/v1/system/Vorlagestudiengang.php index efa8963d1..dbbe23e1e 100644 --- a/application/controllers/api/v1/system/Vorlagestudiengang.php +++ b/application/controllers/api/v1/system/Vorlagestudiengang.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Webservicelog.php b/application/controllers/api/v1/system/Webservicelog.php index d9e2597c4..ece2e2ff6 100644 --- a/application/controllers/api/v1/system/Webservicelog.php +++ b/application/controllers/api/v1/system/Webservicelog.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Webservicerecht.php b/application/controllers/api/v1/system/Webservicerecht.php index 7e1adcc58..4f281edaa 100644 --- a/application/controllers/api/v1/system/Webservicerecht.php +++ b/application/controllers/api/v1/system/Webservicerecht.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/system/Webservicetyp.php b/application/controllers/api/v1/system/Webservicetyp.php index 60c2d5b7c..09303c87c 100644 --- a/application/controllers/api/v1/system/Webservicetyp.php +++ b/application/controllers/api/v1/system/Webservicetyp.php @@ -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; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Ablauf.php b/application/controllers/api/v1/testtool/Ablauf.php index 1ce2d8fef..f2e7d9d63 100644 --- a/application/controllers/api/v1/testtool/Ablauf.php +++ b/application/controllers/api/v1/testtool/Ablauf.php @@ -21,11 +21,11 @@ class Ablauf extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Ablauf' => 'basis/ablauf:rw')); // Load model AblaufModel $this->load->model('testtool/ablauf_model', 'AblaufModel'); - - + + } /** @@ -34,11 +34,11 @@ class Ablauf extends APIv1_Controller public function getAblauf() { $ablaufID = $this->get('ablauf_id'); - + if (isset($ablaufID)) { $result = $this->AblaufModel->load($ablaufID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Ablauf extends APIv1_Controller { $result = $this->AblaufModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Ablauf extends APIv1_Controller $this->response(); } } - + private function _validate($ablauf = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Antwort.php b/application/controllers/api/v1/testtool/Antwort.php index 7ae8e5293..7730dd3e9 100644 --- a/application/controllers/api/v1/testtool/Antwort.php +++ b/application/controllers/api/v1/testtool/Antwort.php @@ -21,11 +21,11 @@ class Antwort extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Antwort' => 'basis/antwort:rw')); // Load model AntwortModel $this->load->model('testtool/antwort_model', 'AntwortModel'); - - + + } /** @@ -34,11 +34,11 @@ class Antwort extends APIv1_Controller public function getAntwort() { $antwortID = $this->get('antwort_id'); - + if (isset($antwortID)) { $result = $this->AntwortModel->load($antwortID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Antwort extends APIv1_Controller { $result = $this->AntwortModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Antwort extends APIv1_Controller $this->response(); } } - + private function _validate($antwort = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Frage.php b/application/controllers/api/v1/testtool/Frage.php index ec27b2435..83989956a 100644 --- a/application/controllers/api/v1/testtool/Frage.php +++ b/application/controllers/api/v1/testtool/Frage.php @@ -21,11 +21,11 @@ class Frage extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Frage' => 'basis/frage:rw')); // Load model FrageModel $this->load->model('testtool/frage_model', 'FrageModel'); - - + + } /** @@ -34,11 +34,11 @@ class Frage extends APIv1_Controller public function getFrage() { $frageID = $this->get('frage_id'); - + if (isset($frageID)) { $result = $this->FrageModel->load($frageID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Frage extends APIv1_Controller { $result = $this->FrageModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Frage extends APIv1_Controller $this->response(); } } - + private function _validate($frage = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Gebiet.php b/application/controllers/api/v1/testtool/Gebiet.php index 2814f14a2..12cba24ab 100644 --- a/application/controllers/api/v1/testtool/Gebiet.php +++ b/application/controllers/api/v1/testtool/Gebiet.php @@ -21,11 +21,11 @@ class Gebiet extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Gebiet' => 'basis/gebiet:rw')); // Load model GebietModel $this->load->model('testtool/gebiet_model', 'GebietModel'); - - + + } /** @@ -34,11 +34,11 @@ class Gebiet extends APIv1_Controller public function getGebiet() { $gebietID = $this->get('gebiet_id'); - + if (isset($gebietID)) { $result = $this->GebietModel->load($gebietID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Gebiet extends APIv1_Controller { $result = $this->GebietModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Gebiet extends APIv1_Controller $this->response(); } } - + private function _validate($gebiet = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Kategorie.php b/application/controllers/api/v1/testtool/Kategorie.php index 0cd5075e5..5058ac76d 100644 --- a/application/controllers/api/v1/testtool/Kategorie.php +++ b/application/controllers/api/v1/testtool/Kategorie.php @@ -21,11 +21,11 @@ class Kategorie extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Kategorie' => 'basis/kategorie:rw')); // Load model KategorieModel $this->load->model('testtool/kategorie_model', 'KategorieModel'); - - + + } /** @@ -34,11 +34,11 @@ class Kategorie extends APIv1_Controller public function getKategorie() { $kategorie_kurzbz = $this->get('kategorie_kurzbz'); - + if (isset($kategorie_kurzbz)) { $result = $this->KategorieModel->load($kategorie_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Kategorie extends APIv1_Controller { $result = $this->KategorieModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Kategorie extends APIv1_Controller $this->response(); } } - + private function _validate($kategorie = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Kriterien.php b/application/controllers/api/v1/testtool/Kriterien.php index acb546790..2420dcb62 100644 --- a/application/controllers/api/v1/testtool/Kriterien.php +++ b/application/controllers/api/v1/testtool/Kriterien.php @@ -21,11 +21,11 @@ class Kriterien extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Kriterien' => 'basis/kriterien:rw')); // Load model KriterienModel $this->load->model('testtool/kriterien_model', 'KriterienModel'); - - + + } /** @@ -34,11 +34,11 @@ class Kriterien extends APIv1_Controller public function getKriterien() { $kriterienID = $this->get('kriterien_id'); - + if (isset($kriterienID)) { $result = $this->KriterienModel->load($kriterienID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Kriterien extends APIv1_Controller { $result = $this->KriterienModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Kriterien extends APIv1_Controller $this->response(); } } - + private function _validate($kriterien = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Pruefling.php b/application/controllers/api/v1/testtool/Pruefling.php index 65671120f..3a471035e 100644 --- a/application/controllers/api/v1/testtool/Pruefling.php +++ b/application/controllers/api/v1/testtool/Pruefling.php @@ -21,11 +21,11 @@ class Pruefling extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Pruefling' => 'basis/pruefling:rw')); // Load model PrueflingModel $this->load->model('testtool/pruefling_model', 'PrueflingModel'); - - + + } /** @@ -34,11 +34,11 @@ class Pruefling extends APIv1_Controller public function getPruefling() { $prueflingID = $this->get('pruefling_id'); - + if (isset($prueflingID)) { $result = $this->PrueflingModel->load($prueflingID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Pruefling extends APIv1_Controller { $result = $this->PrueflingModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Pruefling extends APIv1_Controller $this->response(); } } - + private function _validate($pruefling = NULL) { return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/testtool/Vorschlag.php b/application/controllers/api/v1/testtool/Vorschlag.php index 0f7f0b76c..0874b384a 100644 --- a/application/controllers/api/v1/testtool/Vorschlag.php +++ b/application/controllers/api/v1/testtool/Vorschlag.php @@ -21,11 +21,11 @@ class Vorschlag extends APIv1_Controller */ public function __construct() { - parent::__construct(); + parent::__construct(array('Vorschlag' => 'basis/vorschlag:rw')); // Load model VorschlagModel $this->load->model('testtool/vorschlag_model', 'VorschlagModel'); - - + + } /** @@ -34,11 +34,11 @@ class Vorschlag extends APIv1_Controller public function getVorschlag() { $vorschlagID = $this->get('vorschlag_id'); - + if (isset($vorschlagID)) { $result = $this->VorschlagModel->load($vorschlagID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -62,7 +62,7 @@ class Vorschlag extends APIv1_Controller { $result = $this->VorschlagModel->insert($this->post()); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -70,9 +70,9 @@ class Vorschlag extends APIv1_Controller $this->response(); } } - + private function _validate($vorschlag = NULL) { return true; } -} \ No newline at end of file +}