diff options
-rw-r--r-- | include/zot.php | 15 | ||||
-rw-r--r-- | version.inc | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php index 0376dc7f5..a81c13707 100644 --- a/include/zot.php +++ b/include/zot.php @@ -296,9 +296,18 @@ function zot_refresh($them, $channel = null, $force = false) { if ($them['hubloc_url']) { $url = $them['hubloc_url']; } else { - $r = q("select hubloc_url, hubloc_flags from hubloc where hubloc_hash = '%s'", - dbesc($them['xchan_hash']) - ); + $r = null; + + if(array_key_exists('xchan_addr',$them) && $them['xchan_addr']) { + $r = q("select hubloc_url, hubloc_flags from hubloc where hubloc_addr = '%s'", + dbesc($them['xchan_addr']) + ); + } + if(! $r) { + $r = q("select hubloc_url, hubloc_flags from hubloc where hubloc_hash = '%s'", + dbesc($them['xchan_hash']) + ); + } if ($r) { foreach ($r as $rr) { if ($rr['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) { diff --git a/version.inc b/version.inc index 5842b45a1..763c01a75 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-09-08.1149 +2015-09-10.1151 |