diff options
author | zotlabs <mike@macgirvin.com> | 2018-12-09 16:37:15 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-12-09 16:37:15 -0800 |
commit | 214b81e49174b98f09382eec3ef2bd7ecf24ad01 (patch) | |
tree | f1d16273140bbc0f54438a27d124459573916931 /Zotlabs/Module/Rmagic.php | |
parent | e60fb175242516382d1e1a61fce327c38515f3ee (diff) | |
download | volse-hubzilla-214b81e49174b98f09382eec3ef2bd7ecf24ad01.tar.gz volse-hubzilla-214b81e49174b98f09382eec3ef2bd7ecf24ad01.tar.bz2 volse-hubzilla-214b81e49174b98f09382eec3ef2bd7ecf24ad01.zip |
rmagic discovery for z6 networks
Diffstat (limited to 'Zotlabs/Module/Rmagic.php')
-rw-r--r-- | Zotlabs/Module/Rmagic.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zotlabs/Module/Rmagic.php b/Zotlabs/Module/Rmagic.php index 33a6689ca..8c1e5cdab 100644 --- a/Zotlabs/Module/Rmagic.php +++ b/Zotlabs/Module/Rmagic.php @@ -14,6 +14,15 @@ class Rmagic extends \Zotlabs\Web\Controller { $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", dbesc($me) ); + if(! $r) { + $w = discover_by_webbie($me); + if($w) { + $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", + dbesc($me) + ); + } + } + if($r) { if($r[0]['hubloc_url'] === z_root()) goaway(z_root() . '/login'); @@ -49,7 +58,16 @@ class Rmagic extends \Zotlabs\Web\Controller { $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", dbesc($address) ); + if(! $r) { + $w = discover_by_webbie($address); + if($w) { + $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", + dbesc($address) + ); + } + } } + if($r) { $url = $r[0]['hubloc_url']; } |