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
This commit is contained in:
Alexandre Alapetite
2022-06-25 11:15:51 +02:00
committed by GitHub
parent 07a52137a9
commit d785ddde2a
26 changed files with 143 additions and 64 deletions

View File

@@ -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();
}