aboutsummaryrefslogtreecommitdiff
path: root/p/api/pshb.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-07-21 14:54:34 +0200
committerGravatar GitHub <noreply@github.com> 2024-07-21 14:54:34 +0200
commit0eeac4a669e46fb6521ae1765b23656c9afc43de (patch)
tree7c5a08b80b628f855b11c8850aa993c0b509feb1 /p/api/pshb.php
parent47b5e40e7240b5ccb0d0b6c54e0a958243689c83 (diff)
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
Diffstat (limited to 'p/api/pshb.php')
-rw-r--r--p/api/pshb.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/p/api/pshb.php b/p/api/pshb.php
index 9f5b4822c..8fcc5ab34 100644
--- a/p/api/pshb.php
+++ b/p/api/pshb.php
@@ -133,11 +133,8 @@ foreach ($users as $userFilename) {
Minz_ExtensionManager::enableByList(FreshRSS_Context::userConf()->extensions_enabled, 'user');
Minz_Translate::reset(FreshRSS_Context::userConf()->language);
- [$updated_feeds, , $nb_new_articles] = FreshRSS_feed_Controller::actualizeFeeds(null, $self, null, $simplePie);
- if ($nb_new_articles > 0) {
- FreshRSS_feed_Controller::commitNewEntries();
- }
- if ($updated_feeds > 0) {
+ [$nbUpdatedFeeds, ] = FreshRSS_feed_Controller::actualizeFeedsAndCommit(null, $self, null, $simplePie);
+ if ($nbUpdatedFeeds > 0) {
$nb++;
} else {
Minz_Log::warning('Warning: User ' . $username . ' does not subscribe anymore to ' . $self, PSHB_LOG);