[-] BO : BugFix : #PSFV-556 : Category problem - new category not properly assigned to root

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13655 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-02-28 08:56:56 +00:00
parent ce993b62fe
commit b012c79557
@@ -241,6 +241,15 @@ class AdminCategoriesControllerCore extends AdminController
parent::initToolbar();
if ($this->_category->id == Category::getTopCategory()->id && isset($this->toolbar_btn['new']))
unset($this->toolbar_btn['new']);
// after adding a category
if (empty($this->display))
{
$id_category = (Tools::isSubmit('id_category')) ? '&id_parent='.(int)Tools::getValue('id_category') : '';
$this->toolbar_btn['new'] = array(
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category,
'desc' => $this->l('Add new')
);
}
}
public function initProcess()