We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit c17d7b67 authored by Jeffery To's avatar Jeffery To Committed by Craig Andrews

Set returnto when redirected to login of a private install (for 0.9.x)

Can't use returnToArgs() because we don't have an action object yet.
parent 86329741
......@@ -278,6 +278,20 @@ function main()
&& !preg_match('/rss$/', $action)
&& !preg_match('/^Api/', $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'));
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment