diff options
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 82e33dd84..055ec60e4 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -373,7 +373,7 @@ SQL; * @return array<FreshRSS_Feed> */ public function listFeedsOrderUpdate(int $defaultCacheDuration = 3600, int $limit = 0): array { - $sql = 'SELECT id, url, kind, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, ttl, attributes ' + $sql = 'SELECT id, url, kind, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, ttl, attributes, `cache_nbEntries`, `cache_nbUnreads` ' . 'FROM `_feed` ' . ($defaultCacheDuration < 0 ? '' : 'WHERE ttl >= ' . FreshRSS_Feed::TTL_DEFAULT . ' AND `lastUpdate` < (' . (time() + 60) @@ -468,7 +468,7 @@ SQL; * Remember to call updateCachedValues() after calling this function * @return int|false number of lines affected or false in case of error */ - public function keepMaxUnread(int $id, int $n) { + public function markAsReadMaxUnread(int $id, int $n) { //Double SELECT for MySQL workaround ERROR 1093 (HY000) $sql = <<<'SQL' UPDATE `_entry` SET is_read=1 @@ -610,8 +610,8 @@ SQL; $myFeed->_error($dao['error'] ?? 0); $myFeed->_ttl($dao['ttl'] ?? FreshRSS_Feed::TTL_DEFAULT); $myFeed->_attributes('', $dao['attributes'] ?? ''); - $myFeed->_nbNotRead($dao['cache_nbUnreads'] ?? 0); - $myFeed->_nbEntries($dao['cache_nbEntries'] ?? 0); + $myFeed->_nbNotRead($dao['cache_nbUnreads'] ?? -1); + $myFeed->_nbEntries($dao['cache_nbEntries'] ?? -1); if (isset($dao['id'])) { $myFeed->_id($dao['id']); } |
