Merge pull request #260 from zzottel/master

Small fix
This commit is contained in:
friendica 2014-01-10 01:14:59 -08:00
commit 4e9866f6b2

View File

@ -1023,8 +1023,9 @@ function zid_init(&$a) {
dbesc($tmp_str) dbesc($tmp_str)
); );
// try to avoid recursion - but send them home to do a proper magic auth // try to avoid recursion - but send them home to do a proper magic auth
$dest = str_replace(array('?zid=','&zid='),array('?rzid=','&rzid='),$dest); $query = $a->query_string;
$dest = '/' . urlencode($a->query_string); $query = str_replace(array('?zid=','&zid='),array('?rzid=','&rzid='),$query);
$dest = '/' . urlencode($query);
if($r && ($r[0]['hubloc_url'] != z_root()) && (! strstr($dest,'/magic')) && (! strstr($dest,'/rmagic'))) { 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); goaway($r[0]['hubloc_url'] . '/magic' . '?f=&rev=1&dest=' . z_root() . $dest);
} }