From e31dca14069a166a093a1b42e8dac1075d94d768 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 Dec 2005 07:50:06 +0100 Subject: fix login redirect to calling page --- functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index eedb9ab7b..dbdc1ce69 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 { -- cgit v1.2.3