[-] BO : AdminModule now sort modules by alphabetical order

This commit is contained in:
fSerny committed 2011-12-28 10:19:36 +00:00
1 parent 48925d4559
commit 1bf09ed011
2 files changed
+10 -1

No files matched your search

+9
View File
@@ -1050,6 +1050,15 @@ abstract class ModuleCore
//echo round($current_memory / 1024 / 1024, 2).'Mo<br />'; //echo round($current_memory / 1024 / 1024, 2).'Mo<br />';
// @TODO review
function sortModules($a, $b)
{
if ($a->displayName == $b->displayName)
return 0;
return ($a->displayName < $b->displayName) ? -1 : 1;
}
usort($moduleList, "sortModules");
if ($errors) if ($errors)
{ {
echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) couldn\'t be loaded').':</h3><ol>'; echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) couldn\'t be loaded').':</h3><ol>';
+1 -1
View File
@@ -234,7 +234,7 @@ class AdminModulesControllerCore extends AdminController
$this->initContent(); $this->initContent();
$this->context->smarty->display('modules/list.tpl'); $this->context->smarty->display('modules/list.tpl');
die('OK'); exit;
} }
public function ajaxProcessSetFilter() public function ajaxProcessSetFilter()