return fatalError(error_code, error_msg);
}
- var counters = reply.firstChild;
+ var counters = reply.getElementsByTagName("counters")[0];
parse_counters(counters, scheduled_call);
- var runtime_info = counters.nextSibling;
+ var runtime_info = reply.getElementsByTagName("runtime-info")[0];
parse_runtime_info(runtime_info);
$result = db_query($link, "UPDATE ttrss_user_entries SET marked = $mark
WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
- print "<rpc-reply><mark>$id</mark></rpc-reply>";
+ print "<rpc-reply><counters>";
+ getGlobalCounters($link);
+ getLabelCounters($link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
+ print "</counters></rpc-reply>";
}
$result = db_query($link, "UPDATE ttrss_user_entries SET published = $pub
WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
- print "<rpc-reply><pub>$id</pub></rpc-reply>";
+ print "<rpc-reply><counters>";
+ getGlobalCounters($link);
+ getLabelCounters($link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
+ print "</counters></rpc-reply>";
}
//new Ajax.Request(query); */
+ debug(query);
+
xmlhttp_rpc.open("GET", query, true);
xmlhttp_rpc.onreadystatechange=all_counters_callback;
xmlhttp_rpc.send(null);