summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-01-18 16:47:52 +0300
committerAndrew Dolgov <[email protected]>2011-01-18 16:47:52 +0300
commit6615cc366c7d58b2f3291a76d6c299a114155899 (patch)
treed6bce1bdb53292f03ede97bb9dfe36d365707108 /backend.php
parent8122dae505d4115773f348b973a7ea2ec360e2b6 (diff)
properly handle redirecting back to requested page after logging in (closes #302)
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php14
1 files changed, 2 insertions, 12 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;
}