// Added the possibility to sort the modules in the tabs

This commit is contained in:
Damien Metzger
2013-07-03 17:50:24 +02:00
parent ec981b7f86
commit ae03669541
2 changed files with 5 additions and 5 deletions
+3 -4
View File
@@ -538,11 +538,10 @@ class TabCore extends ObjectModel
foreach($tab->attributes() as $key => $value)
if ($key == 'display_type')
$display_type = (string)$value;
foreach ($tab->children() as $module)
foreach ($module->attributes() as $k => $v)
if ($k == 'name')
$modules_list[$display_type][] = (string)$v;
$modules_list[$display_type][(int)$module['position']] = (string)$module['name'];
ksort($modules_list[$display_type]);
}
}
+2 -1
View File
@@ -2233,7 +2233,7 @@ class AdminControllerCore extends Controller
$all_modules = Module::getModulesOnDisk(true);
$this->modules_list = array();
foreach($all_modules as $module)
foreach ($all_modules as $module)
{
$perm = true;
if ($module->id)
@@ -2252,6 +2252,7 @@ class AdminControllerCore extends Controller
$this->modules_list[] = $module;
}
}
if (count($this->modules_list))
return true;