// in prefetch mode we only output requested cids, main article
// just gets marked as read (it already exists in client cache)
- if ($mode != "prefetch") {
+ if ($mode == "") {
outputArticleXML($link, $id, $feed_id);
- } else {
+ } else if ($mode == "prefetch") {
catchupArticleById($link, $id, 0);
}
}
}
- print "<counters>";
- getAllCounters($link, $omode);
- print "</counters>";
+ if ($mode != "prefetch_old") {
+ print "<counters>";
+ getAllCounters($link, $omode);
+ print "</counters>";
+ }
print "</reply>";
}
if (getActiveFeedId() == _qfd_deleted_feed) {
var h = document.getElementById("headlines-frame");
if (h) {
- h.innerHTML = "<div class='whiteBox'>No feed selected.</div>";
+ h.innerHTML = "<div class='whiteBox'>" + __('No feed selected.') + "</div>";
}
}
if (counters) {
debug("parsing piggybacked counters: " + counters);
parse_counters(counters, false);
+ } else {
+ debug("counters container not found in reply");
}
} else {
debug("headlines_callback: returned no XML object");
- f.innerHTML = xmlhttp.responseText;
- update_all_counters();
+ f.innerHTML = "<div class='whiteBox'>" + __('Could not update headlines (missing XML object)') + "</div>";
}
if (typeof correctPNG != 'undefined') {
} else {
debug("article_callback: returned no XML object");
+ f.innerHTML = "<div class='whiteBox'>" + __('Could not display article (missing XML object)') + "</div>";
}
} catch (e) {
exception_error("article_callback", e);
debug("parsing piggybacked counters: " + counters);
parse_counters(counters, false);
} else {
- update_all_counters();
+ debug("counters container not found in reply");
}
}
} else if (cached_article) {
+ query = query + "&mode=prefetch_old";
+
+ debug(query);
+
+ xmlhttp.open("GET", query, true);
+ xmlhttp.onreadystatechange=article_callback;
+ xmlhttp.send(null);
+
render_article(cached_article);
}