From 8c2113f9e6eb86b630a4e861513229d7abf219b8 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Mon, 1 Jan 2018 20:34:06 +0100 Subject: Add mute strategy configuration (#1750) --- app/Models/Feed.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 560f7415d..216a26d44 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -1,6 +1,12 @@ ttl; } + public function mute() { + return $this->mute; + } // public function ttlExpire() { // $ttl = $this->ttl; - // if ($ttl == -2) { //Default + // if ($ttl == self::TTL_DEFAULT) { //Default // $ttl = FreshRSS_Context::$user_conf->ttl_default; // } // if ($ttl == -1) { //Never @@ -198,8 +208,7 @@ class FreshRSS_Feed extends Minz_Model { $this->lastUpdate = $value; } public function _priority($value) { - $value = intval($value); - $this->priority = $value >= 0 ? $value : 10; + $this->priority = intval($value); } public function _pathEntries($value) { $this->pathEntries = $value; @@ -219,8 +228,8 @@ class FreshRSS_Feed extends Minz_Model { public function _ttl($value) { $value = intval($value); $value = min($value, 100000000); - $value = max($value, -2); - $this->ttl = $value; + $this->ttl = abs($value); + $this->mute = $value < self::TTL_DEFAULT; } public function _nbNotRead($value) { $this->nbNotRead = intval($value); -- cgit v1.2.3