mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 07:05:56 +00:00
support omode in rpc getAllCounters
This commit is contained in:
@@ -782,6 +782,12 @@ function update_all_counters(feed) {
|
|||||||
query = query + "&aid=" + 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.open("GET", query, true);
|
||||||
xmlhttp_rpc.onreadystatechange=all_counters_callback;
|
xmlhttp_rpc.onreadystatechange=all_counters_callback;
|
||||||
xmlhttp_rpc.send(null);
|
xmlhttp_rpc.send(null);
|
||||||
|
|||||||
@@ -1480,13 +1480,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllCounters($link) {
|
function getAllCounters($link, $omode = "tflc") {
|
||||||
getLabelCounters($link);
|
/* getLabelCounters($link);
|
||||||
getFeedCounters($link);
|
getFeedCounters($link);
|
||||||
getTagCounters($link);
|
getTagCounters($link);
|
||||||
getGlobalCounters($link);
|
getGlobalCounters($link);
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
getCategoryCounters($link);
|
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"];
|
$owner_uid = $_SESSION["uid"];
|
||||||
|
|
||||||
if (!$tags) {
|
|
||||||
|
|
||||||
/* virtual feeds */
|
/* virtual feeds */
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
@@ -2749,6 +2760,8 @@
|
|||||||
print "</ul>\n";
|
print "</ul>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$tags) {
|
||||||
|
|
||||||
if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
|
if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id,sql_exp,description FROM
|
$result = db_query($link, "SELECT id,sql_exp,description FROM
|
||||||
|
|||||||
@@ -44,7 +44,10 @@
|
|||||||
if ($subop == "getAllCounters") {
|
if ($subop == "getAllCounters") {
|
||||||
print "<rpc-reply>";
|
print "<rpc-reply>";
|
||||||
print "<counters>";
|
print "<counters>";
|
||||||
getAllCounters($link);
|
|
||||||
|
$omode = $_GET["omode"];
|
||||||
|
|
||||||
|
getAllCounters($link, $omode);
|
||||||
print "</counters>";
|
print "</counters>";
|
||||||
print_runtime_info($link);
|
print_runtime_info($link);
|
||||||
print "</rpc-reply>";
|
print "</rpc-reply>";
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ function scheduleFeedUpdate(force) {
|
|||||||
omode = "T";
|
omode = "T";
|
||||||
} else {
|
} else {
|
||||||
if (display_tags) {
|
if (display_tags) {
|
||||||
omode = "t";
|
omode = "tl";
|
||||||
} else {
|
} else {
|
||||||
omode = "flc";
|
omode = "flc";
|
||||||
}
|
}
|
||||||
@@ -190,6 +190,8 @@ function updateFeedList(silent, fetch) {
|
|||||||
// notify("Loading feed list...");
|
// notify("Loading feed list...");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
debug("<b>updateFeedList</b>");
|
||||||
|
|
||||||
var query_str = "backend.php?op=feeds";
|
var query_str = "backend.php?op=feeds";
|
||||||
|
|
||||||
if (display_tags) {
|
if (display_tags) {
|
||||||
|
|||||||
Reference in New Issue
Block a user