From 1ca77e0acd1d283112559cbfb3b3aac1802ffc32 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Apr 2011 00:14:37 +0400 Subject: [PATCH] merge logout.php inside backend.php --- backend.php | 12 +++++++++++- db-updater.php | 2 +- digest.php | 22 +++++++++++----------- logout.php | 11 ----------- register.php | 2 +- tt-rss.php | 2 +- 6 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 logout.php diff --git a/backend.php b/backend.php index 72535113..c78284c6 100644 --- a/backend.php +++ b/backend.php @@ -60,7 +60,7 @@ if (!($_SESSION["uid"] && validate_session($link)) && $op != "globalUpdateFeeds" && $op != "rss" && $op != "getUnread" && $op != "getProfiles" && - $op != "pubsub") { + $op != "logout" && $op != "pubsub") { header("Content-Type: text/plain"); print json_encode(array("error" => array("code" => 6))); @@ -571,6 +571,16 @@ } break; + + case "logout": + logout_user(); + header("Location: tt-rss.php"); + break; + + default: + header("Content-Type: text/plain"); + print json_encode(array("error" => array("code" => 7))); + break; } // Select action according to $op value. // We close the connection to database. diff --git a/db-updater.php b/db-updater.php index 6df74a86..dca3a374 100644 --- a/db-updater.php +++ b/db-updater.php @@ -155,7 +155,7 @@ function confirmOP() { print "

".T_sprintf("Finished. Performed %d update(s) up to schema version %d.", $num_updates, $version)."

"; - print "
+ print "
"; diff --git a/digest.php b/digest.php index 366be994..63da7762 100644 --- a/digest.php +++ b/digest.php @@ -1,12 +1,12 @@ - @@ -60,7 +60,7 @@ - + @@ -103,7 +103,7 @@
-

: +

:

@@ -117,11 +117,11 @@ Tiny Tiny RSS - v + v - © 2005– + © 2005– Andrew Dolgov - +
diff --git a/logout.php b/logout.php deleted file mode 100644 index 855deec7..00000000 --- a/logout.php +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/register.php b/register.php index fb6261ba..2b464dc8 100644 --- a/register.php +++ b/register.php @@ -148,7 +148,7 @@ if (!ENABLE_REGISTRATION) { print_error(__("New user registrations are administratively disabled.")); - print "

+ print "

"; return; diff --git a/tt-rss.php b/tt-rss.php index c294ee58..16b15e84 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -79,7 +79,7 @@ - |
+ |