piggy-back counters to view reply
This commit is contained in:
parent
fed4387da1
commit
5a94a953ea
|
@ -301,6 +301,7 @@
|
||||||
$feed_id = db_escape_string($_GET["feed"]);
|
$feed_id = db_escape_string($_GET["feed"]);
|
||||||
$cids = split(",", db_escape_string($_GET["cids"]));
|
$cids = split(",", db_escape_string($_GET["cids"]));
|
||||||
$mode = db_escape_string($_GET["mode"]);
|
$mode = db_escape_string($_GET["mode"]);
|
||||||
|
$omode = db_escape_string($_GET["omode"]);
|
||||||
|
|
||||||
print "<reply>";
|
print "<reply>";
|
||||||
|
|
||||||
|
@ -319,6 +320,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<counters>";
|
||||||
|
getAllCounters($link, $omode);
|
||||||
|
print "</counters>";
|
||||||
|
|
||||||
print "</reply>";
|
print "</reply>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
viewfeed.js
15
viewfeed.js
|
@ -122,9 +122,16 @@ function article_callback() {
|
||||||
if (_reload_feedlist_after_view) {
|
if (_reload_feedlist_after_view) {
|
||||||
setTimeout('updateFeedList(false, false)', 50);
|
setTimeout('updateFeedList(false, false)', 50);
|
||||||
_reload_feedlist_after_view = false;
|
_reload_feedlist_after_view = false;
|
||||||
|
} else {
|
||||||
|
var counters = xmlhttp.responseXML.getElementsByTagName("counters")[0];
|
||||||
|
|
||||||
|
if (counters) {
|
||||||
|
debug("parsing piggybacked counters: " + counters);
|
||||||
|
parse_counters(counters, false);
|
||||||
} else {
|
} else {
|
||||||
update_all_counters();
|
update_all_counters();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
notify("");
|
notify("");
|
||||||
}
|
}
|
||||||
|
@ -194,6 +201,14 @@ function view(id, feed_id, skip_history) {
|
||||||
|
|
||||||
debug("additional ids: " + cids_to_request.toString());
|
debug("additional ids: " + cids_to_request.toString());
|
||||||
|
|
||||||
|
/* additional info for piggyback counters */
|
||||||
|
|
||||||
|
if (tagsAreDisplayed()) {
|
||||||
|
query = query + "&omode=lt";
|
||||||
|
} else {
|
||||||
|
query = query + "&omode=flc";
|
||||||
|
}
|
||||||
|
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
var timestamp = Math.round(date.getTime() / 1000);
|
var timestamp = Math.round(date.getTime() / 1000);
|
||||||
query = query + "&ts=" + timestamp;
|
query = query + "&ts=" + timestamp;
|
||||||
|
|
Loading…
Reference in New Issue