Miscellaneous corrections and optimizations

This commit is contained in:
bergware
2018-03-10 15:21:20 +01:00
parent 1c75fee1e3
commit f5bb5dfd5a

View File

@@ -24,7 +24,7 @@ if (empty($vms)) {
}
if (file_exists($cfg)) {
$prefs = parse_ini_file($cfg); $sort = [];
foreach ($vms as $vm) $sort[] = array_search($vm,$prefs) ?: 999;
foreach ($vms as $vm) $sort[] = array_search($vm,$prefs) ?? 999;
array_multisort($sort,SORT_NUMERIC,$vms);
} else {
natsort($vms);