aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-13 02:33:13 -0800
committerfriendica <info@friendica.com>2013-02-13 02:33:13 -0800
commit942adadec63805e9f6dbed63d7f8a4b69a597e91 (patch)
treebefb2d40b7e0e70ef4b454bacdaf57544cdafdfe
parentd1e5337c72a358acd94f5e5aa53f96ce05abd6c5 (diff)
downloadvolse-hubzilla-942adadec63805e9f6dbed63d7f8a4b69a597e91.tar.gz
volse-hubzilla-942adadec63805e9f6dbed63d7f8a4b69a597e91.tar.bz2
volse-hubzilla-942adadec63805e9f6dbed63d7f8a4b69a597e91.zip
fix auto rmagic when visiting with zid
-rw-r--r--boot.php6
-rw-r--r--mod/post.php6
2 files changed, 9 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index d26d6a5f1..363fa2e4f 100644
--- a/boot.php
+++ b/boot.php
@@ -1973,9 +1973,9 @@ function get_my_address() {
}
function zid_init(&$a) {
- $tmp_str = get_my_url();
- if(validate_url($tmp_str)) {
- proc_run('php','include/gprobe.php',bin2hex($tmp_str));
+ $tmp_str = get_my_address();
+ if($tmp_str && strpos($tmp_str,'@')) {
+ proc_run('php','include/gprobe.php',$tmp_str);
$arr = array('zid' => $tmp_str, 'url' => $a->cmd);
call_hooks('zid_init',$arr);
if((! local_user()) && (! remote_user())) {
diff --git a/mod/post.php b/mod/post.php
index 6fcdcb54e..b7c16ff9a 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -111,8 +111,14 @@ function post_init(&$a) {
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'))
goaway(z_root());
+
goaway($desturl);
}