aboutsummaryrefslogtreecommitdiff
path: root/app/views/javascript/nbUnreadsPerFeed.phtml
blob: f82893f13b373486a374718b6ddd6319e8ac9ffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
declare(strict_types=1);
/** @var FreshRSS_ViewJavascript $this */

$result = array(
	'feeds' => array(),
	'tags' => array(),
);
foreach ($this->categories as $cat) {
	foreach ($cat->feeds() as $feed) {
		$result['feeds'][$feed->id()] = $feed->nbNotRead();
	}
}
foreach ($this->tags as $tag) {
	$result['tags'][$tag->id()] = $tag->nbUnread();
}
echo json_encode($result);