diff options
-rw-r--r-- | backend.php | 14 | ||||
-rw-r--r-- | functions.php | 7 |
2 files changed, 8 insertions, 13 deletions
diff --git a/backend.php b/backend.php index 962453c4b..c7bd61808 100644 --- a/backend.php +++ b/backend.php @@ -82,18 +82,8 @@ if ($op == "rpc" || $op == "viewfeed" || $op == "view") { print_error_xml(6); die; } else { - print " - <html><body> - <p>Error: Not logged in.</p> - <script type=\"text/javascript\"> - if (parent.window != 'undefined') { - parent.window.location = \"tt-rss.php\"; - } else { - window.location = \"tt-rss.php\"; - } - </script> - </body></html> - "; + header("Location: tt-rss.php?return=" . + urlencode($_SERVER['REQUEST_URI'])); } exit; } diff --git a/functions.php b/functions.php index 64269aada..0bbefd581 100644 --- a/functions.php +++ b/functions.php @@ -1985,7 +1985,12 @@ } } - header("Location: " . $_SERVER["REQUEST_URI"]); + if ($_REQUEST['return']) { + header("Location: " . $_REQUEST['return']); + } else { + header("Location: " . $_SERVER["REQUEST_URI"]); + } + exit; return; |