aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Category.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-11-04 20:26:30 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-11-04 20:26:30 +0100
commit74639cb1535feddb808a4262e058a67d4a3aef6b (patch)
tree78c5567578751752a3623574cbd768e602a46754 /app/Models/Category.php
parent4c99fd689f0778cbf6a987471ebf72b3787739c2 (diff)
parent4525e547faa8781e37f86125110f28248eb67fd3 (diff)
Merge branch 'dev'
Diffstat (limited to 'app/Models/Category.php')
-rw-r--r--app/Models/Category.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 37cb44dc3..9a44a2d09 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -6,6 +6,7 @@ class FreshRSS_Category extends Minz_Model {
private $nbFeed = -1;
private $nbNotRead = -1;
private $feeds = null;
+ private $hasFeedsWithError = false;
public function __construct($name = '', $feeds = null) {
$this->_name($name);
@@ -16,6 +17,7 @@ class FreshRSS_Category extends Minz_Model {
foreach ($feeds as $feed) {
$this->nbFeed++;
$this->nbNotRead += $feed->nbNotRead();
+ $this->hasFeedsWithError |= $feed->inError();
}
}
}
@@ -51,12 +53,17 @@ class FreshRSS_Category extends Minz_Model {
foreach ($this->feeds as $feed) {
$this->nbFeed++;
$this->nbNotRead += $feed->nbNotRead();
+ $this->hasFeedsWithError |= $feed->inError();
}
}
return $this->feeds;
}
+ public function hasFeedsWithError() {
+ return $this->hasFeedsWithError;
+ }
+
public function _id($value) {
$this->id = $value;
}