fixed module order if or-combined dependencies are used

This commit is contained in:
Roland Gruber 2015-05-30 17:42:32 +00:00
parent f490b3563a
commit 0807a1b741
1 changed files with 14 additions and 1 deletions

View File

@ -2019,7 +2019,20 @@ class accountContainer {
$everything_found = true; $everything_found = true;
$dependencies = $dependencies['depends']; $dependencies = $dependencies['depends'];
for ($d = 0; $d < sizeof($dependencies); $d++) { for ($d = 0; $d < sizeof($dependencies); $d++) {
if (!in_array($dependencies[$d], $order)) { if (is_array($dependencies[$d])) { // or-combined dependencies
$noneFound = true;
foreach ($dependencies[$d] as $or) {
if (in_array($or, $order)) {
$noneFound = false;
break;
}
}
if ($noneFound) {
$everything_found = false;
break;
}
}
elseif (!in_array($dependencies[$d], $order)) { // single dependency
$everything_found = false; $everything_found = false;
break; break;
} }