pref-feeds: show subscribed feeds count (closes #338)

master
Andrew Dolgov 14 years ago
parent 2e2d0802f1
commit e3ba4e2921

@ -79,8 +79,12 @@
array_push($cat['items'], $feed); array_push($cat['items'], $feed);
} }
$cat['param'] = T_sprintf('(%d feeds)', count($cat['items']));
if (count($cat['items']) > 0) if (count($cat['items']) > 0)
array_push($root['items'], $cat); array_push($root['items'], $cat);
$root['param'] += count($cat['items']);
} }
/* Uncategorized is a special case */ /* Uncategorized is a special case */
@ -112,9 +116,14 @@
array_push($cat['items'], $feed); array_push($cat['items'], $feed);
} }
$cat['param'] = T_sprintf('(%d feeds)', count($cat['items']));
if (count($cat['items']) > 0) if (count($cat['items']) > 0)
array_push($root['items'], $cat); array_push($root['items'], $cat);
$root['param'] += count($cat['items']);
$root['param'] = T_sprintf('(%d feeds)', $root['param']);
} else { } else {
$feed_result = db_query($link, "SELECT id, title, last_error, $feed_result = db_query($link, "SELECT id, title, last_error,
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
@ -135,6 +144,9 @@
array_push($root['items'], $feed); array_push($root['items'], $feed);
} }
$root['param'] = T_sprintf('(%d feeds)', count($root['items']));
} }
$fl = array(); $fl = array();

Loading…
Cancel
Save