diff options
Diffstat (limited to 'app/Models/FeedDAO.php')
-rw-r--r-- | app/Models/FeedDAO.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index d4255cb63..13134788d 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -374,8 +374,7 @@ SQL; * @return array<int,FreshRSS_Feed> where the key is the feed ID */ public function listFeedsOrderUpdate(int $defaultCacheDuration = 3600, int $limit = 0): array { - $sql = 'SELECT id, url, kind, category, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, ttl, attributes, `cache_nbEntries`, `cache_nbUnreads` ' - . 'FROM `_feed` ' + $sql = 'SELECT * FROM `_feed` ' . ($defaultCacheDuration < 0 ? '' : 'WHERE ttl >= ' . FreshRSS_Feed::TTL_DEFAULT . ' AND `lastUpdate` < (' . (time() + 60) . '-(CASE WHEN ttl=' . FreshRSS_Feed::TTL_DEFAULT . ' THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ') |