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

This commit is contained in:
dMetzger
2012-09-12 13:30:40 +00:00
parent 516ec37830
commit 3e0a0c38aa
+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()
{
if ((int)$this->id === 0 || (int)$this->id === 1)
@@ -313,7 +319,7 @@ class CategoryCore extends ObjectModel
$all_cat[] = $this;
foreach ($all_cat as $cat)
{
parent::delete();
$cat->deleteLite();
if (!$this->hasMultishopEntries())
{
$cat->deleteImage();