This commit is contained in:
Martin Müller 2014-05-01 12:32:42 +02:00
parent 7ee7756435
commit 74b04c39cd
2 changed files with 5 additions and 4 deletions

View File

@ -128,9 +128,9 @@ public function delete($id = NULL, $cascade = false){
$dataSource = $this->getDataSource(); $dataSource = $this->getDataSource();
$dataSource->begin(); $dataSource->begin();
$result = $this->DreamjobPageInh->delete($id['DreamjobPageInh']['id'],$cascade); $result = parent::delete($id['DreamjobPageInh']['id'],$cascade);
if($result){ if($result){
$result = parent::delete($id['DreamjobPageInh']['id'],$cascade); $result = $this->DreamjobPageInh->delete($id['DreamjobPageInh']['id'],$cascade);
} }
if($result){ if($result){
$filename = WWW_ROOT . $this->uploadDir . DS .$id['DreamjobPageImage']['image']; $filename = WWW_ROOT . $this->uploadDir . DS .$id['DreamjobPageImage']['image'];

View File

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