support omode in rpc getAllCounters

This commit is contained in:
Andrew Dolgov 2006-12-07 09:06:38 +01:00
parent 0b126ac277
commit cf4d339c28
5 changed files with 50 additions and 26 deletions

View File

@ -782,6 +782,12 @@ function update_all_counters(feed) {
query = query + "&aid=" + feed;
}
if (tagsAreDisplayed()) {
query = query + "&omode=lt";
}
debug("update_all_counters QUERY: " + query);
xmlhttp_rpc.open("GET", query, true);
xmlhttp_rpc.onreadystatechange=all_counters_callback;
xmlhttp_rpc.send(null);

View File

@ -1480,13 +1480,26 @@
}
}
function getAllCounters($link) {
getLabelCounters($link);
function getAllCounters($link, $omode = "tflc") {
/* getLabelCounters($link);
getFeedCounters($link);
getTagCounters($link);
getGlobalCounters($link);
if (get_pref($link, 'ENABLE_FEED_CATS')) {
getCategoryCounters($link);
} */
if (!$omode) $omode = "tflc";
getGlobalCounters($link);
if (strchr($omode, "l")) getLabelCounters($link);
if (strchr($omode, "f")) getFeedCounters($link);
if (strchr($omode, "t")) getTagCounters($link);
if (strchr($omode, "c")) {
if (get_pref($link, 'ENABLE_FEED_CATS')) {
getCategoryCounters($link);
}
}
}
@ -2727,8 +2740,6 @@
$owner_uid = $_SESSION["uid"];
if (!$tags) {
/* virtual feeds */
if (get_pref($link, 'ENABLE_FEED_CATS')) {
@ -2749,6 +2760,8 @@
print "</ul>\n";
}
if (!$tags) {
if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
$result = db_query($link, "SELECT id,sql_exp,description FROM

View File

@ -44,7 +44,10 @@
if ($subop == "getAllCounters") {
print "<rpc-reply>";
print "<counters>";
getAllCounters($link);
$omode = $_GET["omode"];
getAllCounters($link, $omode);
print "</counters>";
print_runtime_info($link);
print "</rpc-reply>";

View File

@ -154,7 +154,7 @@ function scheduleFeedUpdate(force) {
omode = "T";
} else {
if (display_tags) {
omode = "t";
omode = "tl";
} else {
omode = "flc";
}
@ -190,6 +190,8 @@ function updateFeedList(silent, fetch) {
// notify("Loading feed list...");
// }
debug("<b>updateFeedList</b>");
var query_str = "backend.php?op=feeds";
if (display_tags) {