diff --git a/application/config/fhcomplete.php b/application/config/fhcomplete.php index b26fb4769..47867d517 100644 --- a/application/config/fhcomplete.php +++ b/application/config/fhcomplete.php @@ -224,6 +224,8 @@ $config['fhc_acl'] = array 'wawi.tbl_rechnungstyp' => 'basis/rechnungstyp', 'wawi.tbl_zahlungstyp' => 'basis/zahlungstyp', + 'lehre.vw_studienplan' => 'basis/studienplan', + 'public.tbl_sprache' => 'admin', 'public.tbl_msg_thread' => 'admin', 'public.tbl_msg_message' => 'admin' diff --git a/application/config/routes.php b/application/config/routes.php index 0bdb099c2..6fe4b5076 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -54,4 +54,9 @@ $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; // Class name conflicts -$route['api/v1/organisation/studiengang/(:any)'] = 'api/v1/organisation/studiengang2/$1'; \ No newline at end of file +$route['api/v1/organisation/studiengang/(:any)'] = 'api/v1/organisation/studiengang2/$1'; +$route['api/v1/ressource/betriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1'; +$route['api/v1/organisation/fachbereich/(:any)'] = 'api/v1/organisation/fachbereich2/$1'; +$route['api/v1/organisation/geschaeftsjahr/(:any)'] = 'api/v1/organisation/geschaeftsjahr2/$1'; +$route['api/v1/organisation/organisationseinheit/(:any)'] = 'api/v1/organisation/organisationseinheit2/$1'; +$route['api/v1/system/sprache/(:any)'] = 'api/v1/system/sprache2/$1'; \ 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 ff268324d..84209c58c 100644 --- a/application/controllers/api/v1/accounting/Bestelldetailtag.php +++ b/application/controllers/api/v1/accounting/Bestelldetailtag.php @@ -33,11 +33,12 @@ class Bestelldetailtag extends APIv1_Controller */ public function getBestelldetailtag() { - $bestelldetailtagID = $this->get('bestelldetailtag_id'); + $bestelldetail_id = $this->get('bestelldetail_id'); + $tag = $this->get('tag'); - if(isset($bestelldetailtagID)) + if(isset($bestelldetail_id) && isset($tag)) { - $result = $this->BestelldetailtagModel->load($bestelldetailtagID); + $result = $this->BestelldetailtagModel->load(array($bestelldetail_id, $tag)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/accounting/Bestellungtag.php b/application/controllers/api/v1/accounting/Bestellungtag.php index d803e538c..69aae5b69 100644 --- a/application/controllers/api/v1/accounting/Bestellungtag.php +++ b/application/controllers/api/v1/accounting/Bestellungtag.php @@ -33,11 +33,12 @@ class Bestellungtag extends APIv1_Controller */ public function getBestellungtag() { - $bestellungtagID = $this->get('bestellungtag_id'); + $bestellung_id = $this->get('bestellung_id'); + $tag = $this->get('tag'); - if(isset($bestellungtagID)) + if(isset($bestellung_id) && isset($tag)) { - $result = $this->BestellungtagModel->load($bestellungtagID); + $result = $this->BestellungtagModel->load(array($bestellung_id, $tag)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/accounting/Budget.php b/application/controllers/api/v1/accounting/Budget.php index 3b89afbff..4cbd9bf1e 100644 --- a/application/controllers/api/v1/accounting/Budget.php +++ b/application/controllers/api/v1/accounting/Budget.php @@ -33,11 +33,12 @@ class Budget extends APIv1_Controller */ public function getBudget() { - $budgetID = $this->get('budget_id'); + $kostenstelle_id = $this->get('kostenstelle_id'); + $geschaeftsjahr_kurzbz = $this->get('geschaeftsjahr_kurzbz'); - if(isset($budgetID)) + if(isset($kostenstelle_id) && isset($geschaeftsjahr_kurzbz)) { - $result = $this->BudgetModel->load($budgetID); + $result = $this->BudgetModel->load(array($kostenstelle_id, $geschaeftsjahr_kurzbz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/codex/Bisfunktion.php b/application/controllers/api/v1/codex/Bisfunktion.php index b0d90eb7e..a87015063 100644 --- a/application/controllers/api/v1/codex/Bisfunktion.php +++ b/application/controllers/api/v1/codex/Bisfunktion.php @@ -33,11 +33,12 @@ class Bisfunktion extends APIv1_Controller */ public function getBisfunktion() { - $bisfunktionID = $this->get('bisfunktion_id'); + $studiengang_kz = $this->get('studiengang_kz'); + $bisverwendung_id = $this->get('bisverwendung_id'); - if(isset($bisfunktionID)) + if(isset($studiengang_kz) && isset($bisverwendung_id)) { - $result = $this->BisfunktionModel->load($bisfunktionID); + $result = $this->BisfunktionModel->load(array($studiengang_kz, $bisverwendung_id)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/codex/Entwicklungsteam.php b/application/controllers/api/v1/codex/Entwicklungsteam.php index 8f9912ec4..2f4f1e054 100644 --- a/application/controllers/api/v1/codex/Entwicklungsteam.php +++ b/application/controllers/api/v1/codex/Entwicklungsteam.php @@ -33,11 +33,12 @@ class Entwicklungsteam extends APIv1_Controller */ public function getEntwicklungsteam() { - $entwicklungsteamID = $this->get('entwicklungsteam_id'); + $studiengang_kz = $this->get('studiengang_kz'); + $mitarbeiter_uid = $this->get('mitarbeiter_uid'); - if(isset($entwicklungsteamID)) + if(isset($studiengang_kz) && isset($mitarbeiter_uid)) { - $result = $this->EntwicklungsteamModel->load($entwicklungsteamID); + $result = $this->EntwicklungsteamModel->load(array($studiengang_kz, $mitarbeiter_uid)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/codex/Zgvgruppe.php b/application/controllers/api/v1/codex/Zgvgruppe.php index ac07691c1..21314cf82 100644 --- a/application/controllers/api/v1/codex/Zgvgruppe.php +++ b/application/controllers/api/v1/codex/Zgvgruppe.php @@ -33,11 +33,11 @@ class Zgvgruppe extends APIv1_Controller */ public function getZgvgruppe() { - $zgvgruppeID = $this->get('zgvgruppe_id'); + $gruppe_kurzbz = $this->get('gruppe_kurzbz'); - if(isset($zgvgruppeID)) + if(isset($gruppe_kurzbz)) { - $result = $this->ZgvgruppeModel->load($zgvgruppeID); + $result = $this->ZgvgruppeModel->load($gruppe_kurzbz); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/content/Contentgruppe.php b/application/controllers/api/v1/content/Contentgruppe.php index 2421d7144..a2ab09d7f 100644 --- a/application/controllers/api/v1/content/Contentgruppe.php +++ b/application/controllers/api/v1/content/Contentgruppe.php @@ -33,11 +33,12 @@ class Contentgruppe extends APIv1_Controller */ public function getContentgruppe() { - $contentgruppeID = $this->get('contentgruppe_id'); + $gruppe_kurzbz = $this->get('gruppe_kurzbz'); + $content_id = $this->get('content_id'); - if(isset($contentgruppeID)) + if(isset($gruppe_kurzbz) && isset($content_id)) { - $result = $this->ContentgruppeModel->load($contentgruppeID); + $result = $this->ContentgruppeModel->load(array($gruppe_kurzbz, $content_id)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php index ff7a1f228..4335d148a 100644 --- a/application/controllers/api/v1/crm/Dokumentprestudent.php +++ b/application/controllers/api/v1/crm/Dokumentprestudent.php @@ -33,11 +33,12 @@ class Dokumentprestudent extends APIv1_Controller */ public function getDokumentprestudent() { - $dokumentprestudentID = $this->get('dokumentprestudent_id'); + $prestudent_id = $this->get('prestudent_id'); + $dokument_kurzbz = $this->get('dokument_kurzbz'); - if(isset($dokumentprestudentID)) + if(isset($prestudent_id) && isset($dokument_kurzbz)) { - $result = $this->DokumentprestudentModel->load($dokumentprestudentID); + $result = $this->DokumentprestudentModel->load(array($prestudent_id, $dokument_kurzbz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/crm/Dokumentstudiengang.php b/application/controllers/api/v1/crm/Dokumentstudiengang.php index 2006198b9..1b79793a9 100644 --- a/application/controllers/api/v1/crm/Dokumentstudiengang.php +++ b/application/controllers/api/v1/crm/Dokumentstudiengang.php @@ -33,11 +33,12 @@ class Dokumentstudiengang extends APIv1_Controller */ public function getDokumentstudiengang() { - $dokumentstudiengangID = $this->get('dokumentstudiengang_id'); + $studiengang_kz = $this->get('studiengang_kz'); + $dokument_kurzbz = $this->get('dokument_kurzbz'); - if(isset($dokumentstudiengangID)) + if(isset($studiengang_kz) && isset($dokument_kurzbz)) { - $result = $this->DokumentstudiengangModel->load($dokumentstudiengangID); + $result = $this->DokumentstudiengangModel->load(array($studiengang_kz, $dokument_kurzbz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/crm/Preinteressent.php b/application/controllers/api/v1/crm/Preinteressent.php index fbfa6bb94..aaac2b3e2 100644 --- a/application/controllers/api/v1/crm/Preinteressent.php +++ b/application/controllers/api/v1/crm/Preinteressent.php @@ -46,6 +46,25 @@ 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 + { + $this->response(); + } + } /** * @return void diff --git a/application/controllers/api/v1/crm/Preinteressentstudiengang.php b/application/controllers/api/v1/crm/Preinteressentstudiengang.php index f89dad7d4..851d9fc24 100644 --- a/application/controllers/api/v1/crm/Preinteressentstudiengang.php +++ b/application/controllers/api/v1/crm/Preinteressentstudiengang.php @@ -33,11 +33,12 @@ class Preinteressentstudiengang extends APIv1_Controller */ public function getPreinteressentstudiengang() { - $preinteressentstudiengangID = $this->get('preinteressentstudiengang_id'); + $preinteressent_id = $this->get('preinteressent_id'); + $studiengang_kz = $this->get('studiengang_kz'); - if(isset($preinteressentstudiengangID)) + if(isset($preinteressent_id) && isset($studiengang_kz)) { - $result = $this->PreinteressentstudiengangModel->load($preinteressentstudiengangID); + $result = $this->PreinteressentstudiengangModel->load(array($preinteressent_id, $studiengang_kz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index d1032d36e..e4e0930c3 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -33,11 +33,14 @@ class Prestudentstatus extends APIv1_Controller */ public function getPrestudentstatus() { - $prestudentstatusID = $this->get('prestudentstatus_id'); + $ausbildungssemester = $this->get('ausbildungssemester'); + $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); + $status_kurzbz = $this->get('status_kurzbz'); + $prestudent_id = $this->get('prestudent_id'); - if(isset($prestudentstatusID)) + if(isset($ausbildungssemester) && isset($studiensemester_kurzbz) && isset($status_kurzbz) && isset($prestudent_id)) { - $result = $this->PrestudentstatusModel->load($prestudentstatusID); + $result = $this->PrestudentstatusModel->load(array($ausbildungssemester, $studiensemester_kurzbz, $status_kurzbz, $prestudent_id)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Fachbereich.php b/application/controllers/api/v1/organisation/Fachbereich2.php similarity index 87% rename from application/controllers/api/v1/organisation/Fachbereich.php rename to application/controllers/api/v1/organisation/Fachbereich2.php index 7a6008b31..a39d3dc93 100644 --- a/application/controllers/api/v1/organisation/Fachbereich.php +++ b/application/controllers/api/v1/organisation/Fachbereich2.php @@ -14,7 +14,7 @@ if(!defined('BASEPATH')) exit('No direct script access allowed'); -class Fachbereich extends APIv1_Controller +class Fachbereich2 extends APIv1_Controller { /** * Fachbereich API constructor. @@ -33,11 +33,11 @@ class Fachbereich extends APIv1_Controller */ public function getFachbereich() { - $fachbereichID = $this->get('fachbereich_id'); + $fachbereich_kurzbz = $this->get('fachbereich_kurzbz'); - if(isset($fachbereichID)) + if(isset($fachbereich_kurzbz)) { - $result = $this->FachbereichModel->load($fachbereichID); + $result = $this->FachbereichModel->load($fachbereich_kurzbz); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Ferien.php b/application/controllers/api/v1/organisation/Ferien.php index 55ba26f66..a5e02a4ee 100644 --- a/application/controllers/api/v1/organisation/Ferien.php +++ b/application/controllers/api/v1/organisation/Ferien.php @@ -33,11 +33,12 @@ class Ferien extends APIv1_Controller */ public function getFerien() { - $ferienID = $this->get('ferien_id'); + $studiengang_kz = $this->get('studiengang_kz'); + $bezeichnung = $this->get('bezeichnung'); - if(isset($ferienID)) + if(isset($studiengang_kz) && isset($bezeichnung)) { - $result = $this->FerienModel->load($ferienID); + $result = $this->FerienModel->load(array($studiengang_kz, $bezeichnung)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Geschaeftsjahr.php b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php similarity index 86% rename from application/controllers/api/v1/organisation/Geschaeftsjahr.php rename to application/controllers/api/v1/organisation/Geschaeftsjahr2.php index 2b12cb87b..64e9b76bb 100644 --- a/application/controllers/api/v1/organisation/Geschaeftsjahr.php +++ b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php @@ -14,7 +14,7 @@ if(!defined('BASEPATH')) exit('No direct script access allowed'); -class Geschaeftsjahr extends APIv1_Controller +class Geschaeftsjahr2 extends APIv1_Controller { /** * Geschaeftsjahr API constructor. @@ -33,11 +33,11 @@ class Geschaeftsjahr extends APIv1_Controller */ public function getGeschaeftsjahr() { - $geschaeftsjahrID = $this->get('geschaeftsjahr_id'); + $geschaeftsjahr_kurzbz = $this->get('geschaeftsjahr_kurzbz'); - if(isset($geschaeftsjahrID)) + if(isset($geschaeftsjahr_kurzbz)) { - $result = $this->GeschaeftsjahrModel->load($geschaeftsjahrID); + $result = $this->GeschaeftsjahrModel->load($geschaeftsjahr_kurzbz); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Lehrverband.php b/application/controllers/api/v1/organisation/Lehrverband.php index 2a249ac1e..8e2143934 100644 --- a/application/controllers/api/v1/organisation/Lehrverband.php +++ b/application/controllers/api/v1/organisation/Lehrverband.php @@ -33,11 +33,14 @@ class Lehrverband extends APIv1_Controller */ public function getLehrverband() { - $lehrverbandID = $this->get('lehrverband_id'); + $gruppe = $this->get('gruppe'); + $verband = $this->get('verband'); + $semester = $this->get('semester'); + $studiengang_kz = $this->get('studiengang_kz'); - if(isset($lehrverbandID)) + if(isset($gruppe) && isset($verband) && isset($semester) && isset($studiengang_kz)) { - $result = $this->LehrverbandModel->load($lehrverbandID); + $result = $this->LehrverbandModel->load(array($gruppe, $verband, $semester, $studiengang_kz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Organisationseinheit.php b/application/controllers/api/v1/organisation/Organisationseinheit2.php similarity index 86% rename from application/controllers/api/v1/organisation/Organisationseinheit.php rename to application/controllers/api/v1/organisation/Organisationseinheit2.php index 217ce7990..3cbe5ff51 100644 --- a/application/controllers/api/v1/organisation/Organisationseinheit.php +++ b/application/controllers/api/v1/organisation/Organisationseinheit2.php @@ -14,7 +14,7 @@ if(!defined('BASEPATH')) exit('No direct script access allowed'); -class Organisationseinheit extends APIv1_Controller +class Organisationseinheit2 extends APIv1_Controller { /** * Organisationseinheit API constructor. @@ -33,11 +33,11 @@ class Organisationseinheit extends APIv1_Controller */ public function getOrganisationseinheit() { - $organisationseinheitID = $this->get('organisationseinheit_id'); + $oe_kurzbz = $this->get('oe_kurzbz'); - if(isset($organisationseinheitID)) + if(isset($oe_kurzbz)) { - $result = $this->OrganisationseinheitModel->load($organisationseinheitID); + $result = $this->OrganisationseinheitModel->load($oe_kurzbz); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/organisation/Semesterwochen.php b/application/controllers/api/v1/organisation/Semesterwochen.php index c1530ac7c..6980510bd 100644 --- a/application/controllers/api/v1/organisation/Semesterwochen.php +++ b/application/controllers/api/v1/organisation/Semesterwochen.php @@ -33,11 +33,12 @@ class Semesterwochen extends APIv1_Controller */ public function getSemesterwochen() { - $semesterwochenID = $this->get('semesterwochen_id'); + $studiengang_kz = $this->get('studiengang_kz'); + $semester = $this->get('semester'); - if(isset($semesterwochenID)) + if(isset($studiengang_kz) && isset($semester)) { - $result = $this->SemesterwochenModel->load($semesterwochenID); + $result = $this->SemesterwochenModel->load(array($studiengang_kz, $semester)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/person/Benutzergruppe.php b/application/controllers/api/v1/person/Benutzergruppe.php index b2817766e..bc32d5648 100644 --- a/application/controllers/api/v1/person/Benutzergruppe.php +++ b/application/controllers/api/v1/person/Benutzergruppe.php @@ -33,11 +33,12 @@ class Benutzergruppe extends APIv1_Controller */ public function getBenutzergruppe() { - $benutzergruppeID = $this->get('benutzergruppe_id'); + $gruppe_kurzbz = $this->get('gruppe_kurzbz'); + $uid = $this->get('uid'); - if(isset($benutzergruppeID)) + if(isset($gruppe_kurzbz) && isset($uid)) { - $result = $this->BenutzergruppeModel->load($benutzergruppeID); + $result = $this->BenutzergruppeModel->load(array($gruppe_kurzbz, $uid)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/ressource/Betriebsmittelperson.php b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php similarity index 96% rename from application/controllers/api/v1/ressource/Betriebsmittelperson.php rename to application/controllers/api/v1/ressource/Betriebsmittelperson2.php index a097e0247..25c1c75a9 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittelperson.php +++ b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php @@ -14,7 +14,7 @@ if(!defined('BASEPATH')) exit('No direct script access allowed'); -class Betriebsmittelperson extends APIv1_Controller +class Betriebsmittelperson2 extends APIv1_Controller { /** * Betriebsmittelperson API constructor. diff --git a/application/controllers/api/v1/ressource/Firmatag.php b/application/controllers/api/v1/ressource/Firmatag.php index 5115ba465..01bf864b9 100644 --- a/application/controllers/api/v1/ressource/Firmatag.php +++ b/application/controllers/api/v1/ressource/Firmatag.php @@ -33,11 +33,12 @@ class Firmatag extends APIv1_Controller */ public function getFirmatag() { - $firmatagID = $this->get('firmatag_id'); + $tag = $this->get('tag'); + $firma_id = $this->get('firma_id'); - if(isset($firmatagID)) + if(isset($tag) && isset($firma_id)) { - $result = $this->FirmatagModel->load($firmatagID); + $result = $this->FirmatagModel->load(array($tag, $firma_id)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/ressource/Ortraumtyp.php b/application/controllers/api/v1/ressource/Ortraumtyp.php index 817249ea1..20f4ccc93 100644 --- a/application/controllers/api/v1/ressource/Ortraumtyp.php +++ b/application/controllers/api/v1/ressource/Ortraumtyp.php @@ -33,11 +33,12 @@ class Ortraumtyp extends APIv1_Controller */ public function getOrtraumtyp() { - $ortraumtypID = $this->get('ortraumtyp_id'); + $hierarchie = $this->get('hierarchie'); + $ort_kurzbz = $this->get('ort_kurzbz'); - if(isset($ortraumtypID)) + if(isset($hierarchie) && isset($ort_kurzbz)) { - $result = $this->OrtraumtypModel->load($ortraumtypID); + $result = $this->OrtraumtypModel->load(array($hierarchie, $ort_kurzbz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/ressource/Zeitfenster.php b/application/controllers/api/v1/ressource/Zeitfenster.php index 60933098d..d57ba5083 100644 --- a/application/controllers/api/v1/ressource/Zeitfenster.php +++ b/application/controllers/api/v1/ressource/Zeitfenster.php @@ -33,11 +33,14 @@ class Zeitfenster extends APIv1_Controller */ public function getZeitfenster() { - $zeitfensterID = $this->get('zeitfenster_id'); + $wochentag = $this->get('wochentag'); + $studiengang_kz = $this->get('studiengang_kz'); + $ort_kurzbz = $this->get('ort_kurzbz'); + $stunde = $this->get('stunde'); - if(isset($zeitfensterID)) + if(isset($wochentag) && isset($studiengang_kz) && isset($ort_kurzbz) && isset($stunde)) { - $result = $this->ZeitfensterModel->load($zeitfensterID); + $result = $this->ZeitfensterModel->load(array($wochentag, $studiengang_kz, $ort_kurzbz, $stunde)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/ressource/Zeitwunsch.php b/application/controllers/api/v1/ressource/Zeitwunsch.php index be1e03894..71aa1f95d 100644 --- a/application/controllers/api/v1/ressource/Zeitwunsch.php +++ b/application/controllers/api/v1/ressource/Zeitwunsch.php @@ -33,11 +33,13 @@ class Zeitwunsch extends APIv1_Controller */ public function getZeitwunsch() { - $zeitwunschID = $this->get('zeitwunsch_id'); + $tag = $this->get('tag'); + $mitarbeiter_uid = $this->get('mitarbeiter_uid'); + $stunde = $this->get('stunde'); - if(isset($zeitwunschID)) + if(isset($tag) && isset($mitarbeiter_uid) && isset($stunde)) { - $result = $this->ZeitwunschModel->load($zeitwunschID); + $result = $this->ZeitwunschModel->load(array($tag, $mitarbeiter_uid, $stunde)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/system/Rolleberechtigung.php b/application/controllers/api/v1/system/Rolleberechtigung.php index 1fe55d507..6148ce460 100644 --- a/application/controllers/api/v1/system/Rolleberechtigung.php +++ b/application/controllers/api/v1/system/Rolleberechtigung.php @@ -33,11 +33,12 @@ class Rolleberechtigung extends APIv1_Controller */ public function getRolleberechtigung() { - $rolleberechtigungID = $this->get('rolleberechtigung_id'); + $rolle_kurzbz = $this->get('rolle_kurzbz'); + $berechtigung_kurzbz = $this->get('berechtigung_kurzbz'); - if(isset($rolleberechtigungID)) + if(isset($rolle_kurzbz) && isset($berechtigung_kurzbz)) { - $result = $this->RolleberechtigungModel->load($rolleberechtigungID); + $result = $this->RolleberechtigungModel->load(array($rolle_kurzbz, $berechtigung_kurzbz)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/system/Server.php b/application/controllers/api/v1/system/Server.php index 8d6733088..bd621245c 100644 --- a/application/controllers/api/v1/system/Server.php +++ b/application/controllers/api/v1/system/Server.php @@ -33,11 +33,11 @@ class Server extends APIv1_Controller */ public function getServer() { - $serverID = $this->get('server_id'); + $server_kurzbz = $this->get('server_kurzbz'); - if(isset($serverID)) + if(isset($server_kurzbz)) { - $result = $this->ServerModel->load($serverID); + $result = $this->ServerModel->load($server_kurzbz); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/system/Sprache.php b/application/controllers/api/v1/system/Sprache2.php similarity index 89% rename from application/controllers/api/v1/system/Sprache.php rename to application/controllers/api/v1/system/Sprache2.php index 8f4f5814a..e7c5de1ce 100644 --- a/application/controllers/api/v1/system/Sprache.php +++ b/application/controllers/api/v1/system/Sprache2.php @@ -14,7 +14,7 @@ if(!defined('BASEPATH')) exit('No direct script access allowed'); -class Sprache extends APIv1_Controller +class Sprache2 extends APIv1_Controller { /** * Sprache API constructor. @@ -33,11 +33,11 @@ class Sprache extends APIv1_Controller */ public function getSprache() { - $spracheID = $this->get('sprache_id'); + $sprache = $this->get('sprache'); - if(isset($spracheID)) + if(isset($sprache)) { - $result = $this->SpracheModel->load($spracheID); + $result = $this->SpracheModel->load($sprache); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/controllers/api/v1/system/Variable.php b/application/controllers/api/v1/system/Variable.php index 9968d1557..58d74488d 100644 --- a/application/controllers/api/v1/system/Variable.php +++ b/application/controllers/api/v1/system/Variable.php @@ -33,11 +33,12 @@ class Variable extends APIv1_Controller */ public function getVariable() { - $variableID = $this->get('variable_id'); + $uid = $this->get('uid'); + $name = $this->get('name'); - if(isset($variableID)) + if(isset($uid) && isset($name)) { - $result = $this->VariableModel->load($variableID); + $result = $this->VariableModel->load(array($uid, $name)); $this->response($result, REST_Controller::HTTP_OK); } diff --git a/application/models/codex/Zgvgruppe_model.php b/application/models/codex/Zgvgruppe_model.php index 1b8cb2a69..69da70271 100644 --- a/application/models/codex/Zgvgruppe_model.php +++ b/application/models/codex/Zgvgruppe_model.php @@ -8,6 +8,6 @@ class Zgvgruppe_model extends DB_Model { parent::__construct(); $this->dbTable = 'bis.tbl_zgvgruppe'; - $this->pk = ''; + $this->pk = 'gruppe_kurzbz'; } } \ No newline at end of file diff --git a/application/models/system/Server_model.php b/application/models/system/Server_model.php index 69fc16095..4521e1fd4 100644 --- a/application/models/system/Server_model.php +++ b/application/models/system/Server_model.php @@ -9,6 +9,6 @@ class Server_model extends DB_Model { parent::__construct(); $this->dbTable = 'system.tbl_server'; - $this->pk = ''; + $this->pk = 'server_kurzbz'; } -} +} \ No newline at end of file