fix auto rmagic when visiting with zid
This commit is contained in:
parent
d1e5337c72
commit
942adadec6
6
boot.php
6
boot.php
@ -1973,9 +1973,9 @@ function get_my_address() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function zid_init(&$a) {
|
function zid_init(&$a) {
|
||||||
$tmp_str = get_my_url();
|
$tmp_str = get_my_address();
|
||||||
if(validate_url($tmp_str)) {
|
if($tmp_str && strpos($tmp_str,'@')) {
|
||||||
proc_run('php','include/gprobe.php',bin2hex($tmp_str));
|
proc_run('php','include/gprobe.php',$tmp_str);
|
||||||
$arr = array('zid' => $tmp_str, 'url' => $a->cmd);
|
$arr = array('zid' => $tmp_str, 'url' => $a->cmd);
|
||||||
call_hooks('zid_init',$arr);
|
call_hooks('zid_init',$arr);
|
||||||
if((! local_user()) && (! remote_user())) {
|
if((! local_user()) && (! remote_user())) {
|
||||||
|
@ -111,8 +111,14 @@ function post_init(&$a) {
|
|||||||
logger('mod_zot: auth success from ' . $x[0]['xchan_addr'] . ' for ' . $webbie);
|
logger('mod_zot: auth success from ' . $x[0]['xchan_addr'] . ' for ' . $webbie);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME - we really want to save the return_url in the session before we visit rmagic.
|
||||||
|
// This does however prevent a recursion if you visit rmagic directly, as it would otherwise send you back here again.
|
||||||
|
// But z_root() probably isn't where you really want to go.
|
||||||
|
|
||||||
if(strstr($desturl,z_root() . '/rmagic'))
|
if(strstr($desturl,z_root() . '/rmagic'))
|
||||||
goaway(z_root());
|
goaway(z_root());
|
||||||
|
|
||||||
goaway($desturl);
|
goaway($desturl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user