This commit is contained in:
Martin Müller 2014-04-17 12:53:04 +02:00
parent 857bde364b
commit bdf9ede9b2
1 changed files with 4 additions and 3 deletions

View File

@ -57,9 +57,10 @@ class SearchController extends AppController {
if(!empty($this->request->data['DreamjobJobOpening']['branch_id']))
$con['DreamjobJobOpening.branch_id']=$this->request->data['DreamjobJobOpening']['branch_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'])))['DreamjobListCity']['name'].'%';
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'].'%';
}
if(!empty($this->request->data['DreamjobJobOpening']['title']))
$con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%';