aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorZot <mike@macgirvin.com>2019-04-25 11:54:37 +0200
committerMario <mario@mariovavti.com>2019-04-25 11:54:37 +0200
commit3c8f8b76aa35eed1e612cb20537b8648bef3daca (patch)
treeee68e6a3ec60aeedd21fff263e826735fd51f429 /include/zot.php
parentc123fa5422c9c2df741819c4fb9a1b19547866d4 (diff)
downloadvolse-hubzilla-3c8f8b76aa35eed1e612cb20537b8648bef3daca.tar.gz
volse-hubzilla-3c8f8b76aa35eed1e612cb20537b8648bef3daca.tar.bz2
volse-hubzilla-3c8f8b76aa35eed1e612cb20537b8648bef3daca.zip
hubloc confusion in magic auth
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 9f2321bc4..983b73072 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -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];
+
+}