[-] BO : fixed bug loading wrong root category in AdminCategoriesController

Fix wrong root category being loaded.
There's an issue if you activate multishop and create a new root category which loads the wrong category and causes, at least, 'Add new Category' and 'Export' in AdminCategories to redirect back to the category list (e.g. impossible to add/remove categories).
This commit is contained in:
dlage
2013-12-11 01:38:05 +00:00
parent fd1050b0db
commit b4c4068e41

View File

@@ -105,7 +105,7 @@ class AdminCategoriesControllerCore extends AdminController
$this->_category = new Category($id_category);
else
{
if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP)
if (Shop::getContext() == Shop::CONTEXT_SHOP)
$this->_category = new Category($this->context->shop->id_category);
elseif (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
$this->_category = Category::getTopCategory();