X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=b5edc0f947b4e2c0ddb9d1e92a282e64db8db00d;hb=5c021620801d4e06dd7eebcbacfbf040397297a8;hp=997ee6197f27a1b55e222dc932def5f24a4dbd79;hpb=4b98edf75f4e255f8c61087bd1525d89653a521f;p=quix0rs-gnu-social.git diff --git a/index.php b/index.php index 997ee6197f..b5edc0f947 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,7 @@ * @author Robin Millette * @author Sarven Capadisli * @author Tom Adams - * + * * @license GNU Affero General Public License http://www.gnu.org/licenses/ */ @@ -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; }