From 3e0a0c38aa20be726831584eff53a6282fea4023 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Wed, 12 Sep 2012 13:30:40 +0000 Subject: [PATCH] [-] BO : children categories were not really deleted #PSCFV-4028 --- classes/Category.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Category.php b/classes/Category.php index e250950b5..1258fc188 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -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();