diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/chanview.php | 12 | ||||
-rw-r--r-- | mod/post.php | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/mod/chanview.php b/mod/chanview.php index 55f7e95d6..c4942b938 100644 --- a/mod/chanview.php +++ b/mod/chanview.php @@ -78,10 +78,14 @@ function chanview_content(&$a) { return; } - $url = (($observer) - ? z_root() . '/magic?f=&dest=' . $a->poi['xchan_url'] . '&addr=' . $a->poi['xchan_addr'] - : $a->poi['xchan_url'] - ); + if(is_foreigner($a->poi['xchan_hash'])) + $url = $a->poi['xchan_url']; + else { + $url = (($observer) + ? z_root() . '/magic?f=&dest=' . $a->poi['xchan_url'] . '&addr=' . $a->poi['xchan_addr'] + : $a->poi['xchan_url'] + ); + } // let somebody over-ride the iframed viewport presentation diff --git a/mod/post.php b/mod/post.php index 7f495140e..965ba09a3 100644 --- a/mod/post.php +++ b/mod/post.php @@ -69,6 +69,7 @@ function post_init(&$a) { * "success":1, * "confirm":"q0Ysovd1u..." * "service_class":(optional) + * "level":(optional) * } * * 'confirm' in this case is the base64url encoded RSA signature of the concatenation of 'secret' with the @@ -150,6 +151,7 @@ function post_init(&$a) { $remote = remote_user(); $result = null; $remote_service_class = ''; + $remote_level = 0; $remote_hub = $x[0]['hubloc_url']; // Also check that they are coming from the same site as they authenticated with originally. @@ -210,6 +212,8 @@ function post_init(&$a) { } if(array_key_exists('service_class',$j)) $remote_service_class = $j['service_class']; + if(array_key_exists('level',$j)) + $remote_level = $j['level']; } // everything is good... maybe if(local_user()) { @@ -241,6 +245,7 @@ function post_init(&$a) { $_SESSION['visitor_id'] = $x[0]['xchan_hash']; $_SESSION['my_address'] = $address; $_SESSION['remote_service_class'] = $remote_service_class; + $_SESSION['remote_level'] = $remote_level; $_SESSION['remote_hub'] = $remote_hub; $arr = array('xchan' => $x[0], 'url' => $desturl, 'session' => $_SESSION); |