summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-11 10:42:04 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-11 10:42:04 -0400
commit091152b6a55be8e6c6a09cef435e7478076e2e2d (patch)
tree594bd8d58c508df30aabc2287f13a236650f9726
parent76d2a71fb0b644e01e290aa5e132cb00d4d53d58 (diff)
parente432df76d5a0a342fa1b8cc55bbcd1cbd45b40e8 (diff)
Merge commit 'jeff-themovie/0.8.x-private-returnto' into 0.8.x
-rw-r--r--index.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/index.php b/index.php
index 214f92245..be62fe1f3 100644
--- a/index.php
+++ b/index.php
@@ -194,6 +194,21 @@ function main()
}
if (!in_array($action, $public_actions) &&
!preg_match('/rss$/', $action)) {
+
+ // set returnto
+ $rargs =& common_copy_args($args);
+ unset($rargs['action']);
+ if (common_config('site', 'fancy')) {
+ unset($rargs['p']);
+ }
+ if (array_key_exists('submit', $rargs)) {
+ unset($rargs['submit']);
+ }
+ foreach (array_keys($_COOKIE) as $cookie) {
+ unset($rargs[$cookie]);
+ }
+ common_set_returnto(common_local_url($action, $rargs));
+
common_redirect(common_local_url($login_action));
return;
}