From 230cd3883939a77201611206dc0e63fbfffd5fe4 Mon Sep 17 00:00:00 2001 From: Mats Rynge Date: Sun, 30 Dec 2012 00:24:03 -0800 Subject: [PATCH] [-] BO : Fixed a problem with the breadcrumbs in the admin category editing controller. The previous code used asort() which put the category breadcrumbs in the wrong order. --- .../controllers/categories/helpers/list/list_header.tpl | 2 +- controllers/admin/AdminCategoriesController.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl index c2cc39d0f..388888d4b 100644 --- a/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl @@ -35,7 +35,7 @@ {else} {assign var=params_url value="&id_category={$category.id_category}&viewcategory"} {/if} - {if $key == 0} + {if $category.id_category == $categories_tree_current_id} {$category.name} {else} {$category.name} >  diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 1c6395ed2..f160c5d37 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -181,8 +181,9 @@ class AdminCategoriesControllerCore extends AdminController && (Shop::getContext() == Shop::CONTEXT_SHOP && !$is_multishop && $count_categories_without_parent > 1)) $categories_tree = array(array('name' => $this->_category->name[$this->context->language->id])); - asort($categories_tree); + $categories_tree = array_reverse($categories_tree); $this->tpl_list_vars['categories_tree'] = $categories_tree; + $this->tpl_list_vars['categories_tree_current_id'] = $this->_category->id; if (Tools::isSubmit('submitBulkdelete'.$this->table) || Tools::isSubmit('delete'.$this->table)) {