X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=47cde87409b62a31146d553d4e8582bdfd7acb13;hb=e2dee5fedbedef69fbc825fcac39973f91f09c1a;hp=997ee6197f27a1b55e222dc932def5f24a4dbd79;hpb=a42e128c1532c45fd930d98c985f9a8d98ff6868;p=quix0rs-gnu-social.git diff --git a/index.php b/index.php index 997ee6197f..47cde87409 100644 --- a/index.php +++ b/index.php @@ -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; }