From d785ddde2a00a9eadd38c45c528f2d2f6d1c356a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 25 Jun 2022 11:15:51 +0200 Subject: New option to automatically mark as read gone articles (#4426) * New option to automatically mark as read gone articles Option to automatically and immediately mark as read entries / articles that are no longer provided in their upstream RSS / ATOM / XPath feed * Reduce SQL queries Optimisation: Perform cache update only once --- app/Controllers/feedController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index dd87650bc..fe5641642 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -503,10 +503,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { } $feedDAO->updateLastUpdate($feed->id(), false, $mtime); + $needFeedCacheRefresh |= ($feed->keepMaxUnread() != false); + $needFeedCacheRefresh |= ($feed->markAsReadUponGone() != false); if ($needFeedCacheRefresh) { $feedDAO->updateCachedValues($feed->id()); } - $feed->keepMaxUnread(); if ($entryDAO->inTransaction()) { $entryDAO->commit(); } -- cgit v1.2.3