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

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17304 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-09-12 13:30:40 +00:00
parent 656f34b0d1
commit c23a05f132
+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();