summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-19 15:46:23 +0100
committerAndrew Dolgov <[email protected]>2005-11-19 15:46:23 +0100
commit262bd8ea53c3e96bfeb1d82d952ab7cc2f67e8e4 (patch)
tree72a4b4f7ad198327df0cbc53151e5c9ee66c9222 /tt-rss.js
parentd34169139c3d1203b8c882ae9c254eb3f31b0dd7 (diff)
automatically logout user when session expires
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/tt-rss.js b/tt-rss.js
index e6dbc1b9c..70412fcb4 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -70,7 +70,7 @@ function refetch_callback() {
notify("refetch_callback: backend did not return valid XML");
return;
}
-
+
var reply = xmlhttp.responseXML.firstChild;
if (!reply) {
@@ -78,6 +78,12 @@ function refetch_callback() {
return;
}
+ var error_code = reply.getAttribute("error-code");
+
+ if (error_code && error_code != 0) {
+ return fatalError(error_code);
+ }
+
var f_document = window.frames["feeds-frame"].document;
for (var l = 0; l < reply.childNodes.length; l++) {
@@ -133,7 +139,7 @@ function backend_sanity_check_callback() {
return;
}
- var error_code = reply.getAttribute("code");
+ var error_code = reply.getAttribute("error-code");
if (error_code && error_code != 0) {
return fatalError(error_code);