From 3d3b33ea2e3f00a3de154086341c1fc2abcadc3e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 6 Jul 2014 10:12:37 +0200 Subject: Bug global TTL https://github.com/marienfressinaud/FreshRSS/issues/250 --- app/Models/FeedDAO.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/Models/FeedDAO.php') diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 83f3a6231..756b1f008 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -223,6 +223,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { } public function listFeedsOrderUpdate($defaultCacheDuration = 3600) { + if ($defaultCacheDuration < 0) { + $defaultCacheDuration = 2147483647; + } $sql = 'SELECT id, url, name, website, lastUpdate, pathEntries, httpAuth, keep_history, ttl ' . 'FROM `' . $this->prefix . 'feed` ' . 'WHERE ttl <> -1 AND lastUpdate < (' . (time() + 60) . '-(CASE WHEN ttl=-2 THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ' -- cgit v1.2.3