summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-20 00:14:37 +0400
committerAndrew Dolgov <[email protected]>2011-04-20 00:14:37 +0400
commit1ca77e0acd1d283112559cbfb3b3aac1802ffc32 (patch)
treeaa0046fa6fda2e6efdbec41f238729a6ba374b08 /backend.php
parente31ed61af333d231ca6b437c93be89259cb3706a (diff)
merge logout.php inside backend.php
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/backend.php b/backend.php
index 72535113b..c78284c6a 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.