if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
- if (time() - $_SESSION["get_all_counters_stamp"] > 300) {
+/* if (time() - $_SESSION["get_all_counters_stamp"] > 300) {
print "<counters>";
getAllCounters($link, $omode, $feed);
print "</counters>";
- }
+ } */
if ($_GET["debug"]) $timing_info = print_checkpoint("30", $timing_info);
f.innerHTML = cache_find_param(cache_prefix + feed, unread_ctr);
- var query = "backend.php?op=rpc&subop=getAllCounters";
-
- if (tagsAreDisplayed()) {
- query = query + "&omode=tl";
- } else {
- query = query + "&omode=flc";
- }
-
- new Ajax.Request(query, {
- onComplete: function(transport) {
- try {
- all_counters_callback2(transport);
- } catch (e) {
- exception_error("viewfeed/getcounters", e);
- }
- } });
+ request_counters();
} else {
exception_error("mouse_move_handler", e);
}
}
+
+function request_counters() {
+
+ try {
+ var query = "backend.php?op=rpc&subop=getAllCounters";
+
+ if (tagsAreDisplayed()) {
+ query = query + "&omode=tl";
+ } else {
+ query = query + "&omode=flc";
+ }
+
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ try {
+ all_counters_callback2(transport);
+ } catch (e) {
+ exception_error("viewfeed/getcounters", e);
+ }
+ } });
+
+ } catch (e) {
+ exception_error("request_counters", e);
+ }
+}
debug("parsing piggybacked counters: " + counters);
parse_counters(counters, false);
} else {
- debug("counters container not found in reply");
+ debug("counters container not found in reply, requesting...");
+ request_counters();
}
if (runtime_info) {