mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-29 07:31:06 -05:00
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
16 lines
351 B
PHTML
16 lines
351 B
PHTML
<?php /** @var FreshRSS_View $this */ ?>
|
|
<?php
|
|
$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);
|