diff options
| author | 2013-12-24 01:21:11 +0100 | |
|---|---|---|
| committer | 2013-12-24 01:21:11 +0100 | |
| commit | 87bfa195a6ff4ff73baadd3c04b7b6f28c9f9b73 (patch) | |
| tree | 927fbfc08401e69d81c0e14fb1fb54d878ac97dd /app/Models/Feed.php | |
| parent | ffbe676d7d33f8e075018bfa35f0d919e3e1a9bf (diff) | |
Permet de configurer plus finement le nombre d’articles minimum à conserver par flux
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 70efb0fa3..5bdf5e6d7 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -15,7 +15,7 @@ class FreshRSS_Feed extends Minz_Model { private $pathEntries = ''; private $httpAuth = ''; private $error = false; - private $keep_history = false; + private $keep_history = 0; public function __construct ($url, $validate=true) { if ($validate) { @@ -163,19 +163,12 @@ class FreshRSS_Feed extends Minz_Model { $this->httpAuth = $value; } public function _error ($value) { - if ($value) { - $value = true; - } else { - $value = false; - } - $this->error = $value; + $this->error = (bool)$value; } public function _keepHistory ($value) { - if ($value) { - $value = true; - } else { - $value = false; - } + $value = intval($value); + $value = min($value, 1000000); + $value = max($value, -1); $this->keep_history = $value; } public function _nbNotRead ($value) { |
