aboutsummaryrefslogtreecommitdiffstats
path: root/mod/magic.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-06 17:04:34 -0800
committerfriendica <info@friendica.com>2013-02-06 17:04:34 -0800
commitaf1b3c6c9ac3e3d3ed60a01f5cabeca8fe0f76dc (patch)
tree91d0bc7f2e5473d4be7a2c957896d95ea8be642b /mod/magic.php
parent6a23ac9217ab5b743cbb14243651ee40cfcc3c5a (diff)
downloadvolse-hubzilla-af1b3c6c9ac3e3d3ed60a01f5cabeca8fe0f76dc.tar.gz
volse-hubzilla-af1b3c6c9ac3e3d3ed60a01f5cabeca8fe0f76dc.tar.bz2
volse-hubzilla-af1b3c6c9ac3e3d3ed60a01f5cabeca8fe0f76dc.zip
this might make zot-id work as originally conceived complete with reverse magic auth. If it doesn't it will probably crash and burn every site involved in horrible ways. To test or not to test.... decisions. (Maybe tomorrow.)
Diffstat (limited to 'mod/magic.php')
-rw-r--r--mod/magic.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/magic.php b/mod/magic.php
index 408619b7e..72fbe6dba 100644
--- a/mod/magic.php
+++ b/mod/magic.php
@@ -22,6 +22,17 @@ function magic_init(&$a) {
intval(HUBLOC_FLAGS_PRIMARY)
);
}
+ else {
+ // See if we know anybody at the dest site that will unlock the door for us
+ $b = explode('/',$dest);
+ if(count($b) >= 2)
+ $u = $b[0] . '//' . $b[2];
+ $x = q("select xchan.xchan_url, hubloc.* from xchan left join hubloc on xchan_hash = hubloc_hash
+ where hubloc_url = '%s' limit 1",
+ dbesc($u)
+ );
+ }
+
if(! $x) {