From: Andrew Dolgov Date: Tue, 14 Jun 2011 09:43:01 +0000 (+0400) Subject: pref-feeds: show subscribed feeds count (closes #338) X-Git-Tag: 1.5.5~10 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e3ba4e29216711dc00317d52fd21716166e203dc;p=tt-rss.git pref-feeds: show subscribed feeds count (closes #338) --- diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 5a65b0dd..0a1fed09 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -79,8 +79,12 @@ array_push($cat['items'], $feed); } + $cat['param'] = T_sprintf('(%d feeds)', count($cat['items'])); + if (count($cat['items']) > 0) array_push($root['items'], $cat); + + $root['param'] += count($cat['items']); } /* Uncategorized is a special case */ @@ -112,9 +116,14 @@ array_push($cat['items'], $feed); } + $cat['param'] = T_sprintf('(%d feeds)', count($cat['items'])); + if (count($cat['items']) > 0) array_push($root['items'], $cat); + $root['param'] += count($cat['items']); + $root['param'] = T_sprintf('(%d feeds)', $root['param']); + } else { $feed_result = db_query($link, "SELECT id, title, last_error, ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated @@ -135,6 +144,9 @@ array_push($root['items'], $feed); } + + $root['param'] = T_sprintf('(%d feeds)', count($root['items'])); + } $fl = array();