hubloc confusion in magic auth

This commit is contained in:
Zot
2019-04-25 11:54:37 +02:00
committed by Mario
parent c123fa5422
commit 3c8f8b76aa
6 changed files with 89 additions and 28 deletions

View File

@@ -5286,3 +5286,25 @@ function zot_reply_notify($data) {
$ret['success'] = true;
json_return_and_die($ret);
}
function zot_record_preferred($arr, $check = 'hubloc_network') {
if(! $arr) {
return $arr;
}
foreach($arr as $v) {
if($v[$check] === 'zot') {
return $v;
}
}
foreach($arr as $v) {
if($v[$check] === 'zot6') {
return $v;
}
}
return $arr[0];
}