From: Andrew Dolgov Date: Sun, 11 Dec 2005 06:50:06 +0000 (+0100) Subject: fix login redirect to calling page X-Git-Tag: schema_freeze_for_1.1.1~67 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e31dca14069a166a093a1b42e8dac1075d94d768;p=tt-rss.git fix login redirect to calling page --- diff --git a/functions.php b/functions.php index eedb9ab7..dbdc1ce6 100644 --- a/functions.php +++ b/functions.php @@ -760,7 +760,8 @@ if (!USE_HTTP_AUTH) { if (!$_SESSION["uid"]) { $redirect_uri = get_login_redirect(); - header("Location: $redirect_uri?rt=tt-rss.php"); + $return_to = preg_replace('/.*?\//', '', $_SERVER["REQUEST_URI"]); + header("Location: $redirect_uri?rt=$return_to"); exit; } } else {