From e31dca14069a166a093a1b42e8dac1075d94d768 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 Dec 2005 07:50:06 +0100 Subject: [PATCH] fix login redirect to calling page --- functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.39.5