From 0eeac4a669e46fb6521ae1765b23656c9afc43de Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 21 Jul 2024 14:54:34 +0200 Subject: Revisit keepMaxUnreads (#6632) * Revisit keepMaxUnreads Again, follow-up of https://github.com/FreshRSS/FreshRSS/pull/5905 fix https://github.com/FreshRSS/FreshRSS/issues/6620 * Refactoring to address buggy cases * Fix minor test --- app/Models/Feed.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 0274ded0a..e9d031a82 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -835,15 +835,12 @@ class FreshRSS_Feed extends Minz_Model { } $feedDAO = FreshRSS_Factory::createFeedDao(); $affected = $feedDAO->markAsReadMaxUnread($this->id(), $keepMaxUnread); - if ($affected > 0) { - Minz_Log::debug(__METHOD__ . " $affected items [" . $this->url(false) . ']'); - } return $affected; } /** * Applies the *mark as read upon gone* policy, if enabled. - * Remember to call `updateCachedValue($id_feed)` or `updateCachedValues()` just after. + * Remember to call `updateCachedValues($id_feed)` or `updateCachedValues()` just after. * @return int|false the number of lines affected, or false if not applicable */ public function markAsReadUponGone(bool $upstreamIsEmpty, int $maxTimestamp = 0) { @@ -871,7 +868,7 @@ class FreshRSS_Feed extends Minz_Model { } /** - * Remember to call `updateCachedValue($id_feed)` or `updateCachedValues()` just after + * Remember to call `updateCachedValues($id_feed)` or `updateCachedValues()` just after * @return int|false */ public function cleanOldEntries() { -- cgit v1.2.3