From a18c35046daee15e7ac5f85db290d54541a03e3c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 11 Nov 2025 08:17:12 +0100 Subject: Housekeeping lib_rss.php (#8193) * Housekeeping lib_rss.php `lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924 Moved most functions to other places. Mostly no change of code otherwise (see comments). * Extension: composer run-script phpstan-third-party --- app/Controllers/feedController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 678388cbb..b6ecbeec2 100644 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -417,14 +417,14 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { } /** - * @param \SimplePie\SimplePie|null $simplePiePush Used by WebSub (PubSubHubbub) to push updates + * @param FreshRSS_SimplePieCustom|null $simplePiePush Used by WebSub (PubSubHubbub) to push updates * @param string $selfUrl Used by WebSub (PubSubHubbub) to override the feed URL * @return array{0:int,1:FreshRSS_Feed|null,2:int,3:array} Number of updated feeds, first feed or null, number of new articles, * list of feeds for which a cache refresh is needed * @throws FreshRSS_BadUrl_Exception */ public static function actualizeFeeds(?int $feed_id = null, ?string $feed_url = null, ?int $maxFeeds = null, - ?\SimplePie\SimplePie $simplePiePush = null, string $selfUrl = ''): array { + ?FreshRSS_SimplePieCustom $simplePiePush = null, string $selfUrl = ''): array { if (function_exists('set_time_limit')) { @set_time_limit(300); } @@ -866,14 +866,14 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { } /** - * @param \SimplePie\SimplePie|null $simplePiePush Used by WebSub (PubSubHubbub) to push updates + * @param FreshRSS_SimplePieCustom|null $simplePiePush Used by WebSub (PubSubHubbub) to push updates * @param string $selfUrl Used by WebSub (PubSubHubbub) to override the feed URL * @return array{0:int,1:FreshRSS_Feed|null,2:int,3:array} Number of updated feeds, first feed or null, number of new articles, * list of feeds for which a cache refresh is needed * @throws FreshRSS_BadUrl_Exception */ public static function actualizeFeedsAndCommit(?int $feed_id = null, ?string $feed_url = null, ?int $maxFeeds = null, - ?SimplePie\SimplePie $simplePiePush = null, string $selfUrl = ''): array { + ?FreshRSS_SimplePieCustom $simplePiePush = null, string $selfUrl = ''): array { $entryDAO = FreshRSS_Factory::createEntryDao(); [$nbUpdatedFeeds, $feed, $nbNewArticles, $feedsCacheToRefresh] = FreshRSS_feed_Controller::actualizeFeeds($feed_id, $feed_url, $maxFeeds, $simplePiePush, $selfUrl); @@ -1066,7 +1066,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { } // Remove related queries - $queries = remove_query_by_get('f_' . $feed_id, FreshRSS_Context::userConf()->queries); + $queries = FreshRSS_UserQuery::remove_query_by_get('f_' . $feed_id, FreshRSS_Context::userConf()->queries); FreshRSS_Context::userConf()->queries = $queries; FreshRSS_Context::userConf()->save(); return true; -- cgit v1.2.3