Docker: fixed autostart order not updated when "wait" values are present

This commit is contained in:
bergware
2018-09-30 09:58:43 +02:00
parent 13084cc5ef
commit 8596c50f86
@@ -37,7 +37,7 @@ if (isset($_POST['reset'])) {
if (file_exists($autostart_file)) {
$prefs = parse_ini_file($user_prefs); $sort = [];
$allAutoStart = file($autostart_file, FILE_IGNORE_NEW_LINES);
foreach ($allAutoStart as $ct) $sort[] = array_search($ct,$prefs) ?? 999;
foreach ($allAutoStart as $ct) $sort[] = array_search(explode(' ',$ct)[0],$prefs) ?? 999;
array_multisort($sort,SORT_NUMERIC,$allAutoStart);
file_put_contents($autostart_file, implode(PHP_EOL, $allAutoStart).PHP_EOL);
}