From bc6353ac9b5b7ff2204282be4f82a79c1aee14c7 Mon Sep 17 00:00:00 2001 From: vChabot Date: Tue, 10 Jan 2012 10:44:16 +0000 Subject: [PATCH] // little fix --- controllers/admin/AdminCategoriesController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 9c11fa685..d850a6368 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -241,13 +241,11 @@ class AdminCategoriesControllerCore extends AdminController $unidentified_group_information = sprintf($this->l('%s - All persons without a customer account or unauthenticated.'), "".$unidentified->name[$this->context->language->id].""); $guest_group_information = sprintf($this->l('%s - Customer who placed an order with the Guest Checkout.'), "".$guest->name[$this->context->language->id].""); $default_group_information = sprintf($this->l('%s - All persons who created an account on this site.'), "".$default->name[$this->context->language->id].""); - if ($this->context->shop() == Shop::CONTEXT_SHOP) - { - $root_category = Category::getRootCategory(); - $root_category = array('id_category' => $root_category->id_category, 'name' => $root_category->name); - } - else + $root_category = Category::getRootCategory(); + if (!$root_category->id_category) $root_category = array('id_category' => '0', 'name' => $this->l('Root')); + else + $root_category = array('id_category' => $root_category->id_category, 'name' => $root_category->name); $this->fields_form = array( 'tinymce' => true, 'legend' => array(