From 4a8f6c3116a090e3946d0484bbdd7c4d77800968 Mon Sep 17 00:00:00 2001 From: Francois Gaillard Date: Thu, 29 Aug 2013 17:00:34 +0200 Subject: [PATCH] // Modules categories sort --- controllers/admin/AdminModulesController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index dc2b3cdd9..c9b6ae487 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -98,6 +98,8 @@ class AdminModulesControllerCore extends AdminController $this->list_modules_categories['others']['name'] = $this->l('Other Modules'); $this->list_modules_categories['mobile']['name'] = $this->l('Mobile'); + uasort($this->list_modules_categories, array($this, 'checkCategoriesNames')); + // Set Id Employee, Iso Default Country and Filter Configuration $this->id_employee = (int)$this->context->employee->id; $this->iso_default_country = $this->context->country->iso_code; @@ -129,6 +131,14 @@ class AdminModulesControllerCore extends AdminController $this->logged_on_addons = true; } + public function checkCategoriesNames($a, $b) + { + if ($a['name'] === $this->l('Other Modules')) + return true; + + return (bool)($a['name'] > $b['name']); + } + public function setMedia() { parent::setMedia();