This commit is contained in:
Martin Müller 2014-05-01 12:27:07 +02:00
parent fbc1b214fd
commit 1bd99f9cda
3 changed files with 6 additions and 4 deletions

View File

@ -378,8 +378,10 @@ class UserController extends AppController {
if($result){
$this->MiconwareSession->refreshCache();
if(isset($profil['DreamjobWorker']))
$profil = $this->MiconwareSession->getWorker();
if(empty($profil) or count($profil) <= 0)
else
$profil = $this->MiconwareSession->getCompany();
$this->MiconwareSession->setFlash(__('dreamjob.pages.delete'),'flash',array('alert'=>'success'));
}else{

View File

@ -127,7 +127,7 @@ public function processUpload($check=array()) {
public function delete($id = NULL, $cascade = false){
$dataSource = $this->getDataSource();
$dataSource->begin();
$result = $this->delete($id['DreamjobPageInh']['id'],$cascade);
$result = parent::delete($id['DreamjobPageInh']['id'],$cascade);
if($result){
$result = $this->DreamjobPageInh->delete($id['DreamjobPageInh']['id'],$cascade);
}

View File

@ -43,7 +43,7 @@ class DreamjobPageText extends AppModel {
public function delete($id = NULL, $cascade = false){
$dataSource = $this->getDataSource();
$dataSource->begin();
$result = $this->delete($id,$cascade);
$result = parent::delete($id,$cascade);
if($result){
$result = $this->DreamjobPageInh->delete($id,$cascade);
}