diff --git a/classes/Category.php b/classes/Category.php index 1fe840292862b..4094c4c68be0f 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -232,7 +232,7 @@ public function update($null_values = false) public function toggleStatus() { $result = parent::toggleStatus(); - Hook::exec('actionCategoryUpdate'); + Hook::exec('actionCategoryUpdate', array('category' => $this)); return $result; } @@ -1387,7 +1387,7 @@ public function updatePosition($way, $position) c.`date_upd` = "'.date('Y-m-d H:i:s').'" WHERE c.`id_parent` = '.(int)$moved_category['id_parent'].' AND c.`id_category`='.(int)$moved_category['id_category'])); - Hook::exec('actionCategoryUpdate'); + Hook::exec('actionCategoryUpdate', array('category' => $moved_category)); return $result; } diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 5959664e693a7..e64dff11b59f3 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -939,8 +939,6 @@ public function ajaxProcessUpdatePositions() $category = new Category($id_category_to_move); if (Validate::isLoadedObject($category)) { if (isset($position) && $category->updatePosition($way, $position)) { - Hook::exec('actionCategoryUpdate'); - /* Position '0' was not found in given positions so try to reorder parent category*/ if (!$found_first) { $category->cleanPositions((int)$category->id_parent);