Skip to content

Commit

Permalink
[-] Class: Missing category param when update positions + duplicate call
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Sep 28, 2015
1 parent bdfd9e3 commit d81b70a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions classes/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions controllers/admin/AdminCategoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d81b70a

Please sign in to comment.