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/Models/UserQuery.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'app/Models/UserQuery.php') diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php index 26264fa24..6050436f4 100644 --- a/app/Models/UserQuery.php +++ b/app/Models/UserQuery.php @@ -350,4 +350,22 @@ class FreshRSS_UserQuery { public function setImageUrl(string $imageUrl): void { $this->imageUrl = $imageUrl; } + + /** + * Remove queries where $get is appearing. + * @param string $get the get attribute which should be removed. + * @param array $queries an array of queries. + * @return array without queries where $get is appearing. + */ + public static function remove_query_by_get(string $get, array $queries): array { + $final_queries = []; + foreach ($queries as $query) { + if (empty($query['get']) || $query['get'] !== $get) { + $final_queries[] = $query; + } + } + return $final_queries; + } } -- cgit v1.2.3