]> git.wh0rd.org Git - tt-rss.git/commitdiff
pref-feeds: show subscribed feeds count (closes #338)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 14 Jun 2011 09:43:01 +0000 (13:43 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 14 Jun 2011 09:43:01 +0000 (13:43 +0400)
modules/pref-feeds.php

index 5a65b0dd52b8d98a30bb86827cc02ab44e2abdae..0a1fed09609d04073d4a6b68960e186bef9a82fa 100644 (file)
                                                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 */
                                        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
 
                                        array_push($root['items'], $feed);
                                }
+
+                               $root['param'] = T_sprintf('(%d feeds)', count($root['items']));
+
                        }
 
                        $fl = array();