diff --git a/app/Model/DreamjobPageImage.php b/app/Model/DreamjobPageImage.php index d4cc0f5..b56a6f3 100644 --- a/app/Model/DreamjobPageImage.php +++ b/app/Model/DreamjobPageImage.php @@ -127,9 +127,10 @@ public function processUpload($check=array()) { public function delete($id = NULL, $cascade = false){ $dataSource = $this->getDataSource(); $dataSource->begin(); - $result = parent::delete($id['DreamjobPageInh']['id'],$cascade); + + $result = $this->DreamjobPageInh->delete($id['DreamjobPageInh']['id'],$cascade); if($result){ - $result = $this->DreamjobPageInh->delete($id['DreamjobPageInh']['id'],$cascade); + $result = parent::delete($id['DreamjobPageInh']['id'],$cascade); } if($result){ $filename = WWW_ROOT . $this->uploadDir . DS .$id['DreamjobPageImage']['image']; diff --git a/app/Model/DreamjobPageText.php b/app/Model/DreamjobPageText.php index 46f005c..acf092c 100644 --- a/app/Model/DreamjobPageText.php +++ b/app/Model/DreamjobPageText.php @@ -43,9 +43,9 @@ class DreamjobPageText extends AppModel { public function delete($id = NULL, $cascade = false){ $dataSource = $this->getDataSource(); $dataSource->begin(); - $result = parent::delete($id,$cascade); + $result = $this->DreamjobPageInh->delete($id,$cascade); if($result){ - $result = $this->DreamjobPageInh->delete($id,$cascade); + $result = parent::delete($id,$cascade); } if ($result) { $dataSource->commit();