- Added new library ReihungstestLib

- Added method isEntitled to FCH_Model
- Cleaned the controllers by moving the database related code in the models or libraries
This commit is contained in:
bison
2016-08-30 12:26:22 +02:00
parent 0581183b28
commit fbed4b2261
8 changed files with 160 additions and 93 deletions
@@ -55,10 +55,7 @@ class Gemeinde extends APIv1_Controller
if (is_numeric($plz))
{
$this->GemeindeModel->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer");
$this->GemeindeModel->addOrder("ortschaftsname");
$result = $this->GemeindeModel->loadWhere(array("plz" => $plz));
$result = $this->GemeindeModel->getGemeindeByPlz($plz);
$this->response($result, REST_Controller::HTTP_OK);
}