move inactive modules to the end

This commit is contained in:
Roland Gruber 2008-03-25 17:48:16 +00:00
parent f829d1995b
commit 8c72fe4dfd
1 changed files with 13 additions and 1 deletions

View File

@ -1026,6 +1026,7 @@ class accountContainer {
} }
} }
} }
$this->sortModules();
} }
// save account // save account
if (!$errorsOccured && isset($_POST['accountContainerSaveAccount'])) { if (!$errorsOccured && isset($_POST['accountContainerSaveAccount'])) {
@ -1805,7 +1806,18 @@ class accountContainer {
if (sizeof($depModules) > 0) { if (sizeof($depModules) > 0) {
for ($i = 0; $i < sizeof($depModules); $i++) $order[] = $depModules[$i]; for ($i = 0; $i < sizeof($depModules); $i++) $order[] = $depModules[$i];
} }
$this->order = $order; // move disabled modules to end
$activeModules = array();
$passiveModules = array();
for ($i = 0; $i < sizeof($order); $i++) {
if ($this->module[$order[$i]]->getButtonStatus() == 'enabled') {
$activeModules[] = $order[$i];
}
else {
$passiveModules[] = $order[$i];
}
}
$this->order = array_merge($activeModules, $passiveModules);
} }
/** /**