aboutsummaryrefslogtreecommitdiff
path: root/app/views/javascript/nbUnreadsPerFeed.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-10-28 09:49:10 +0100
committerGravatar GitHub <noreply@github.com> 2018-10-28 09:49:10 +0100
commite04804d0f67dd43fd3f072b9a127768ee7b7b56c (patch)
treea49023ed25aab7fb1c1aafe749f7d462de0027b2 /app/views/javascript/nbUnreadsPerFeed.phtml
parent44bd07e506ade204151c276fdc05994d51efdd7a (diff)
parent4234dfe0d72b61fe931d2c76a1d8a335ce65a209 (diff)
Merge pull request #2049 from FreshRSS/dev1.12.0
FreshRSS 1.12.0
Diffstat (limited to 'app/views/javascript/nbUnreadsPerFeed.phtml')
-rw-r--r--app/views/javascript/nbUnreadsPerFeed.phtml10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/javascript/nbUnreadsPerFeed.phtml b/app/views/javascript/nbUnreadsPerFeed.phtml
index 68f98ce9e..ce4db37b7 100644
--- a/app/views/javascript/nbUnreadsPerFeed.phtml
+++ b/app/views/javascript/nbUnreadsPerFeed.phtml
@@ -1,8 +1,14 @@
<?php
-$result = array();
+$result = array(
+ 'feeds' => array(),
+ 'tags' => array(),
+);
foreach ($this->categories as $cat) {
foreach ($cat->feeds() as $feed) {
- $result[$feed->id()] = $feed->nbNotRead();
+ $result['feeds'][$feed->id()] = $feed->nbNotRead();
}
}
+foreach ($this->tags as $tag) {
+ $result['tags'][$tag->id()] = $tag->nbUnread();
+}
echo json_encode($result);