From 474f9cfba1f7c8fb56a4a8f4147fdf5ec85b392d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Tue, 22 Apr 2014 16:15:30 +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 | 9 ++++++--- app/View/Search/academy.ctp | 4 ++-- app/View/Search/education.ctp | 4 ++-- app/View/Search/internship.ctp | 4 ++-- app/View/Search/opening.ctp | 8 ++++---- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php index 0182718..29d7b47 100644 --- a/app/Controller/SearchController.php +++ b/app/Controller/SearchController.php @@ -60,7 +60,10 @@ class SearchController extends AppController { if(!empty($this->request->data['DreamjobJobOpening']['title'])) $con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%'; - + + if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48){ + $con['DreamjobUser.city_id']=$this->request->data['DreamjobUser']['city']; + } $openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con)); @@ -91,7 +94,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_id']=$con['DreamjobJobOpening']['city']; + $con['DreamjobJobOpening.city_id']=$this->request->data['DreamjobJobOpening']['city']; } if(!empty($this->request->data['DreamjobJobOpening']['postcode'])) $con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%'; @@ -121,7 +124,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_id']=$data['DreamjobUser']['city']; + $con['DreamjobUser.city_id']=$this->request->data['DreamjobUser']['city']; } if(!empty($this->request->data['AppUser']['nickname'])) $con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%'; diff --git a/app/View/Search/academy.ctp b/app/View/Search/academy.ctp index b633b86..b92b3a7 100644 --- a/app/View/Search/academy.ctp +++ b/app/View/Search/academy.ctp @@ -20,8 +20,8 @@ echo $this->Form->input('DreamjobJobOpening.title',$a); ?>