From f2743d3e9ea24a545669fd73f65908e825251153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 19 Feb 2014 00:18:48 +0100 Subject: [PATCH] favoriten --- app/Controller/JobController.php | 2 +- app/Model/DreamjobJobFavority.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/Controller/JobController.php b/app/Controller/JobController.php index 8f0e0f3..bf3d779 100644 --- a/app/Controller/JobController.php +++ b/app/Controller/JobController.php @@ -50,7 +50,7 @@ class JobController extends AppController { if($val['id'] == $this->request->params['id']) $fav=true; } - $data = array('DreamjobJobFavority' => array('opening_id' => $this->request->params['id'], 'worker_id' => $WORKER['AppUser']['id'])); + $data = array('DreamjobJobFavority' => array('opening_id' => $this->request->params['id'], 'worker_id' => $WORKER['AppUser']['id']),'modified' => false); $data2 = array('DreamjobJobFavority.opening_id' => $this->request->params['id'], 'DreamjobJobFavority.worker_id' => $WORKER['AppUser']['id']); if($fav){ $this->MiconwareSession->setFlash('dreamjob.opening.fav.delete','flash',array('alert'=>'success')); diff --git a/app/Model/DreamjobJobFavority.php b/app/Model/DreamjobJobFavority.php index f7c40c6..8d4054d 100644 --- a/app/Model/DreamjobJobFavority.php +++ b/app/Model/DreamjobJobFavority.php @@ -22,6 +22,14 @@ class DreamjobJobFavority extends AppModel { //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), + 'multiple' => array( + 'rule' => array('multiple'), + //'message' => 'Your custom message here', + //'allowEmpty' => false, + //'required' => false, + //'last' => false, // Stop validation after this rule + //'on' => 'create', // Limit validation to 'create' or 'update' operations + ), ), 'opening_id' => array( 'numeric' => array( @@ -32,6 +40,14 @@ class DreamjobJobFavority extends AppModel { //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), + 'multiple' => array( + 'rule' => array('multiple'), + //'message' => 'Your custom message here', + //'allowEmpty' => false, + //'required' => false, + //'last' => false, // Stop validation after this rule + //'on' => 'create', // Limit validation to 'create' or 'update' operations + ), ), );