From: Andrew Dolgov Date: Thu, 7 Dec 2006 08:06:38 +0000 (+0100) Subject: support omode in rpc getAllCounters X-Git-Tag: 1.2.6~23 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cf4d339c28240f0390524335c7d8effdc3a63068;p=tt-rss.git support omode in rpc getAllCounters --- diff --git a/feedlist.js b/feedlist.js index d324c6a8..caffc938 100644 --- a/feedlist.js +++ b/feedlist.js @@ -184,7 +184,7 @@ function feedlist_init() { if (getActiveFeedId()) { debug("some feed is open on feedlist refresh, reloading"); setTimeout("viewCurrentFeed()", 100); - } + } } catch (e) { exception_error("feedlist/init", e); diff --git a/functions.js b/functions.js index a3a46a9c..bde6098a 100644 --- a/functions.js +++ b/functions.js @@ -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); diff --git a/functions.php b/functions.php index 7b5da022..84b863e7 100644 --- a/functions.php +++ b/functions.php @@ -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,27 +2740,27 @@ $owner_uid = $_SESSION["uid"]; - if (!$tags) { + /* virtual feeds */ - /* virtual feeds */ + if (get_pref($link, 'ENABLE_FEED_CATS')) { + print "
  • Special
  • "; + print "
  • \n"; - } + if (!$tags) { if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 15359058..3cba704e 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -42,9 +42,12 @@ } if ($subop == "getAllCounters") { - print ""; + print ""; print ""; - getAllCounters($link); + + $omode = $_GET["omode"]; + + getAllCounters($link, $omode); print ""; print_runtime_info($link); print ""; diff --git a/tt-rss.js b/tt-rss.js index 85616b4f..533dd4f1 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -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("updateFeedList"); + var query_str = "backend.php?op=feeds"; if (display_tags) {