aboutsummaryrefslogtreecommitdiffstats
path: root/mod/rmagic.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/rmagic.php')
-rw-r--r--mod/rmagic.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/rmagic.php b/mod/rmagic.php
index 946277327..de81cdcde 100644
--- a/mod/rmagic.php
+++ b/mod/rmagic.php
@@ -65,7 +65,11 @@ function rmagic_post(&$a) {
}
if($url) {
- $dest = z_root() . '/' . str_replace('zid=','zid_=',$a->query_string);
+ if($_SESSION['return_url'])
+ $dest = urlencode(z_root() . '/' . str_replace('zid=','zid_=',$_SESSION['return_url']));
+ else
+ $dest = urlencode(z_root() . '/' . str_replace('zid=','zid_=',$a->query_string));
+
goaway($url . '/magic' . '?f=&dest=' . $dest);
}
}