Merge commit 'jeff-themovie/0.8.x-private-returnto' into 0.8.x

This commit is contained in:
Craig Andrews 2009-08-11 10:42:04 -04:00
commit 091152b6a5

View File

@ -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;
}