diff options
author | Andrew Dolgov <[email protected]> | 2006-12-07 09:06:38 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-12-07 09:06:38 +0100 |
commit | cf4d339c28240f0390524335c7d8effdc3a63068 (patch) | |
tree | 0a03717381b82a9d29d4090ee6025ec3646d2d6d /functions.php | |
parent | 0b126ac277ed5480ef6090ddc7a23a15d21f2960 (diff) |
support omode in rpc getAllCounters
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/functions.php b/functions.php index 7b5da022c..84b863e70 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 "<li class=\"feedCat\">Special</li>"; + print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">"; + } - if (get_pref($link, 'ENABLE_FEED_CATS')) { - print "<li class=\"feedCat\">Special</li>"; - print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">"; - } + $num_starred = getFeedUnread($link, -1); - $num_starred = getFeedUnread($link, -1); + $class = "virt"; - $class = "virt"; + if ($num_starred > 0) $class .= "Unread"; - if ($num_starred > 0) $class .= "Unread"; + printFeedEntry(-1, $class, "Starred articles", $num_starred, + "images/mark_set.png", $link); - printFeedEntry(-1, $class, "Starred articles", $num_starred, - "images/mark_set.png", $link); + if (get_pref($link, 'ENABLE_FEED_CATS')) { + print "</ul>\n"; + } - if (get_pref($link, 'ENABLE_FEED_CATS')) { - print "</ul>\n"; - } + if (!$tags) { if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { |