// Added the possibility to sort the modules in the tabs
This commit is contained in:
+3
-4
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user