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

This commit is contained in:
vChabot
2012-02-28 08:56:56 +00:00
parent 476cce4f41
commit 7efeec47da

View File

@@ -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()