This commit is contained in:
Martin Müller 2014-04-17 12:55:09 +02:00
parent 645ed14ac3
commit 767f5eee31
1 changed files with 9 additions and 10 deletions

View File

@ -57,10 +57,7 @@ class SearchController extends AppController {
if(!empty($this->request->data['DreamjobJobOpening']['branch_id'])) if(!empty($this->request->data['DreamjobJobOpening']['branch_id']))
$con['DreamjobJobOpening.branch_id']=$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'])));
$con['DreamjobJobOpening.city LIKE']='%'.$con['DreamjobJobOpening.city LIKE']['DreamjobListCity']['name'].'%';
}
if(!empty($this->request->data['DreamjobJobOpening']['title'])) if(!empty($this->request->data['DreamjobJobOpening']['title']))
$con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%'; $con['DreamjobJobOpening.title LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['title'].'%';
@ -93,9 +90,10 @@ class SearchController extends AppController {
if(!empty($this->request->data['DreamjobJobOpening']['kindofjob_id'])) if(!empty($this->request->data['DreamjobJobOpening']['kindofjob_id']))
$con['DreamjobJobOpening.kindofjob_id']=$this->request->data['DreamjobJobOpening']['kindofjob_id']; $con['DreamjobJobOpening.kindofjob_id']=$this->request->data['DreamjobJobOpening']['kindofjob_id'];
if(!empty($this->request->data['DreamjobJobOpening']['city']) and $this->request->data['DreamjobJobOpening']['city'] != 48) 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'].'%'; $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']['postcode'])) if(!empty($this->request->data['DreamjobJobOpening']['postcode']))
$con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%'; $con['DreamjobJobOpening.postcode LIKE'] = '%'.$this->request->data['DreamjobJobOpening']['postcode'].'%';
@ -123,9 +121,10 @@ class SearchController extends AppController {
if(!empty($this->request->data['DreamjobCompany']['branch_id'])) if(!empty($this->request->data['DreamjobCompany']['branch_id']))
$con['DreamjobCompany.branch_id']=$this->request->data['DreamjobCompany']['branch_id']; $con['DreamjobCompany.branch_id']=$this->request->data['DreamjobCompany']['branch_id'];
if(!empty($this->request->data['DreamjobUser']['city']) and $this->request->data['DreamjobUser']['city'] != 48) 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'])))['DreamjobListCity']['name']; $con['DreamjobUser.city']=$this->DreamjobListCity->find('first',array('conditions' => array('id'=>$this->request->data['DreamjobUser']['city'])));
$con['DreamjobUser.city']=$con['DreamjobUser.city']['DreamjobListCity']['name'];
}
if(!empty($this->request->data['AppUser']['nickname'])) if(!empty($this->request->data['AppUser']['nickname']))
$con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%'; $con['AppUser.nickname LIKE'] = '%'.$this->request->data['AppUser']['nickname'].'%';