[-] BO : children categories were not really deleted #PSCFV-4028

This commit is contained in:
dMetzger committed 2012-09-12 13:30:40 +00:00
1 parent 516ec37830
commit 3e0a0c38aa
1 file changed
+7 -1
+7 -1
View File
@@ -302,6 +302,12 @@ class CategoryCore extends ObjectModel
} }
} }
public function deleteLite()
{
// Directly call the parent of delete, in order to avoid recursion
return parent::delete();
}
public function delete() public function delete()
{ {
if ((int)$this->id === 0 || (int)$this->id === 1) if ((int)$this->id === 0 || (int)$this->id === 1)
@@ -313,7 +319,7 @@ class CategoryCore extends ObjectModel
$all_cat[] = $this; $all_cat[] = $this;
foreach ($all_cat as $cat) foreach ($all_cat as $cat)
{ {
parent::delete(); $cat->deleteLite();
if (!$this->hasMultishopEntries()) if (!$this->hasMultishopEntries())
{ {
$cat->deleteImage(); $cat->deleteImage();