aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index ef7c140ee..8c20074fe 100755
--- a/boot.php
+++ b/boot.php
@@ -2318,8 +2318,8 @@ function zid_init(&$a) {
$arr = array('zid' => $tmp_str, 'url' => $a->cmd);
call_hooks('zid_init',$arr);
if((! local_user()) && (! remote_user())) {
- logger('zid_init: not authenticated. Invoking reverse magic-auth');
- $r = q("select * from hubloc where hubloc_addr = '%s' limit 1",
+ logger('zid_init: not authenticated. Invoking reverse magic-auth for ' . $tmp_str);
+ $r = q("select * from hubloc where hubloc_addr = '%s' order by hubloc_id desc limit 1",
dbesc($tmp_str)
);
// try to avoid recursion - but send them home to do a proper magic auth
@@ -2328,6 +2328,8 @@ function zid_init(&$a) {
if($r && ($r[0]['hubloc_url'] != z_root()) && (! strstr($dest,'/magic')) && (! strstr($dest,'/rmagic'))) {
goaway($r[0]['hubloc_url'] . '/magic' . '?f=&rev=1&dest=' . z_root() . $dest);
}
+ else
+ logger('zid_init: no hubloc found.');
}
}
}