nbUnreadsPerFeed.phtml 351 B

123456789101112131415
  1. <?php /** @var FreshRSS_View $this */ ?>
  2. <?php
  3. $result = array(
  4. 'feeds' => array(),
  5. 'tags' => array(),
  6. );
  7. foreach ($this->categories as $cat) {
  8. foreach ($cat->feeds() as $feed) {
  9. $result['feeds'][$feed->id()] = $feed->nbNotRead();
  10. }
  11. }
  12. foreach ($this->tags as $tag) {
  13. $result['tags'][$tag->id()] = $tag->nbUnread();
  14. }
  15. echo json_encode($result);