summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-04 22:38:03 +0300
committerAndrew Dolgov <[email protected]>2010-11-04 22:38:03 +0300
commit6a7817c1ad684ea6eb0b02180e6d2040b3cb0a77 (patch)
tree5f5edb9477c9343eefe5b77e38c6b03221fdf325 /backend.php
parent5191a7ce03104935d338beae8c898fe76d164ecb (diff)
handle counters using JSON instead of XML
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/backend.php b/backend.php
index 0182b2436..e13019d45 100644
--- a/backend.php
+++ b/backend.php
@@ -258,9 +258,9 @@
// if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) {
if (time() - $_SESSION["view:counters_stamp"] > 5 && $mode == "prefetch") {
- print "<counters>";
- getAllCounters($link, $omode);
- print "</counters>";
+ print "<counters><![CDATA[";
+ print json_encode(getAllCounters($link, $omode));
+ print "]]></counters>";
$_SESSION["view:counters_stamp"] = time();
}
@@ -389,20 +389,12 @@
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("20", $timing_info);
-
-// if (get_pref($link, "SYNC_COUNTERS") ||
-// time() - $_SESSION["get_all_counters_stamp"] > $viewfeed_ctr_interval) {
-// print "<counters>";
-// getAllCounters($link, $omode, $feed);
-// print "</counters>";
-// }
-
if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop ||
time() - $_SESSION["viewfeed:counters_stamp"] > 5) {
if (!$offset) {
- print "<counters>";
- getAllCounters($link, $omode, $feed);
- print "</counters>";
+ print "<counters><![CDATA[";
+ print json_encode(getAllCounters($link, $omode, $feed));
+ print "]]></counters>";
$_SESSION["viewfeed:counters_stamp"] = time();
}
}