From 43f6cd6b61a2e5a63fadf2f43678ce5de2a95246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Tue, 22 Apr 2014 16:07:28 +0200 Subject: [PATCH] =?UTF-8?q?=20city=20abh=C3=A4ngigkeit=20herstellen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/SearchController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php index 276d301..0182718 100644 --- a/app/Controller/SearchController.php +++ b/app/Controller/SearchController.php @@ -91,8 +91,7 @@ class SearchController extends AppController { $con['DreamjobJobOpening.kindofjob_id']=$this->request->data['DreamjobJobOpening']['kindofjob_id']; if(!empty($this->request->data['DreamjobJobOpening']['city']) and $this->request->data['DreamjobJobOpening']['city'] != 48){ - $con['DreamjobJobOpening.city LIKE']=$this->DreamjobListCity->find('first',array('conditions' => array('id'=>$this->request->data['DreamjobJobOpening']['city']))); - $con['DreamjobJobOpening.city LIKE']='%'.$con['DreamjobJobOpening.city LIKE']['DreamjobListCity']['name'].'%'; + $con['DreamjobJobOpening.city_id']=$con['DreamjobJobOpening']['city']; } if(!empty($this->request->data['DreamjobJobOpening']['postcode'])) $con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%'; @@ -122,8 +121,7 @@ class SearchController extends AppController { $con['DreamjobCompany.branch_id']=$this->request->data['DreamjobCompany']['branch_id']; if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48){ - $con['DreamjobUser.city']=$this->DreamjobListCity->find('first',array('conditions' => array('id'=>$this->request->data['DreamjobUser']['city']))); - $con['DreamjobUser.city']=$con['DreamjobUser.city']['DreamjobListCity']['name']; + $con['DreamjobUser.city_id']=$data['DreamjobUser']['city']; } if(!empty($this->request->data['AppUser']['nickname'])) $con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%';