summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-06 22:19:08 +0300
committerAndrew Dolgov <[email protected]>2010-11-06 22:19:08 +0300
commitffbe082dd0fcaf83658ac0a13ad1bdddeb4e0138 (patch)
treec6524895529162af96a1a42e1aebd128b75f632f /backend.php
parentf72a7b6696286b2b1bb6a3d0ae33bab49e3552d0 (diff)
headlines: use JSON instead of separate helper xml objects like headlines-unread
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/backend.php b/backend.php
index 521472051..761fc0dc0 100644
--- a/backend.php
+++ b/backend.php
@@ -363,8 +363,8 @@
print "]]></headlines>";
- print "<headlines-count value=\"$headlines_count\"/>";
- print "<vgroup-last-feed value=\"$vgroup_last_feed\"/>";
+ //print "<headlines-count value=\"$headlines_count\"/>";
+ //print "<vgroup-last-feed value=\"$vgroup_last_feed\"/>";
$headlines_unread = ccache_find($link, $returned_feed, $_SESSION["uid"],
$cat_view, true);
@@ -374,8 +374,19 @@
}
- print "<headlines-unread value=\"$headlines_unread\"/>";
- printf("<disable-cache value=\"%d\"/>", $disable_cache);
+ //print "<headlines-unread value=\"$headlines_unread\"/>";
+ //printf("<disable-cache value=\"%d\"/>", $disable_cache);
+
+ print "<headlines-info><![CDATA[";
+
+ $info = array("count" => (int) $headlines_count,
+ "vgroup_last_feed" => $vgroup_last_feed,
+ "unread" => (int) $headlines_unread,
+ "disable_cache" => (bool) $disable_cache);
+
+ print json_encode($info);
+
+ print "]]></headlines-info>";
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("10", $timing_info);