1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 02:45:56 +00:00

improve session expiry handling (redirect back to login form on rpc error code 6)

This commit is contained in:
Andrew Dolgov
2006-11-09 11:00:24 +01:00
parent 2e4afda7bf
commit 4724a093a8
3 changed files with 40 additions and 11 deletions

View File

@@ -73,10 +73,22 @@ function refetch_callback() {
return;
}
var error_code = reply.getAttribute("error-code");
var error_code = false;
var error_msg = false;
if (reply.firstChild) {
error_code = reply.firstChild.getAttribute("error-code");
error_msg = reply.firstChild.getAttribute("error-msg");
}
if (!error_code) {
error_code = reply.getAttribute("error-code");
error_msg = reply.getAttribute("error-msg");
}
if (error_code && error_code != 0) {
return fatalError(error_code, reply.getAttribute("error-msg"));
debug("refetch_callback: got error code " + error_code);
return fatalError(error_code, error_msg);
}
var counters = reply.firstChild;
@@ -535,6 +547,11 @@ function toggleDispRead() {
}
function parse_runtime_info(elem) {
if (!elem) {
debug("parse_runtime_info: elem is null, aborting");
return;
}
var param = elem.firstChild;
debug("parse_runtime_info: " + param);