hubloc confusion in magic auth

(cherry picked from commit 3c8f8b76aa)
This commit is contained in:
Zot
2019-04-25 09:54:37 +00:00
committed by Mario
parent f955276694
commit ab8d8aa552
6 changed files with 89 additions and 28 deletions

View File

@@ -5270,3 +5270,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];
}