aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Rmagic.php
diff options
context:
space:
mode:
authorManuel Jiménez Friaza <mjfriaza@openmailbox.org>2018-12-13 12:34:04 +0100
committerManuel Jiménez Friaza <mjfriaza@openmailbox.org>2018-12-13 12:34:04 +0100
commit618d673947dc627dcdac3f9b6da7f31123472b05 (patch)
treedfa52436ec997eec5795b5dee247b3e4f6fa6557 /Zotlabs/Module/Rmagic.php
parent4cd5529027efa19288ddce125f0d41ccb5519578 (diff)
parent6bea3d6bfc984e6f30867f00be5a92b5cd5be925 (diff)
downloadvolse-hubzilla-618d673947dc627dcdac3f9b6da7f31123472b05.tar.gz
volse-hubzilla-618d673947dc627dcdac3f9b6da7f31123472b05.tar.bz2
volse-hubzilla-618d673947dc627dcdac3f9b6da7f31123472b05.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'Zotlabs/Module/Rmagic.php')
-rw-r--r--Zotlabs/Module/Rmagic.php18
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'];
}