aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-05-02 11:33:07 +0200
committerMax Kostikov <max@kostikov.co>2019-05-02 11:33:07 +0200
commit47fba5827bd106f53625b543f30643ca5ba1c16e (patch)
treebef05781eacc6dbc67d03899e0dde0257ce58096 /include/zot.php
parent47f75ad8bfbe8325a76ae6fe466aa8080fc87045 (diff)
parent516167c0f8579c8a068b6e52557e7e1109f897ae (diff)
downloadvolse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.tar.gz
volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.tar.bz2
volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.zip
Merge branch 'dev' into 'dev'
# Conflicts: # Zotlabs/Lib/ThreadItem.php
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];
+
+}