diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index 210b366..9c07da3 100755 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -86,7 +86,7 @@ class UserController extends AppController { $this->set('page',$page); if(!$hard_error) if($company){ - $openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $profil['AppUser']['id']))); + $openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $profil['AppUser']['id'],'DreamjobJobOpening.active'=>1))); $this->set("openings",$openings); $this->render('/User/company'); }else diff --git a/app/View/Errors/pdo_error.ctp b/app/View/Errors/pdo_error.ctp new file mode 100644 index 0000000..c6a96a3 --- /dev/null +++ b/app/View/Errors/pdo_error.ctp @@ -0,0 +1,8 @@ + +
+ +
diff --git a/app/View/Job/opening.ctp b/app/View/Job/opening.ctp index 21fbbb3..c32ac91 100644 --- a/app/View/Job/opening.ctp +++ b/app/View/Job/opening.ctp @@ -12,7 +12,7 @@
Html->link(__('dreamjob.company.to'),array('controller'=>'user','action'=>'profil','id'=>$opening['AppUser']['id']));?> 0){ + if(isset($WORKER) and is_array($WORKER) and count($WORKER) > 0){ ?>