mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 18:23:52 -04:00
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
This commit is contained in:
committed by
GitHub
parent
5e622c60fa
commit
a18c35046d
@@ -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<int,array{get?:string,name?:string,order?:string,search?:string,state?:int,url?:string,token?:string,
|
||||
* shareRss?:bool,shareOpml?:bool,description?:string,imageUrl?:string}> $queries an array of queries.
|
||||
* @return array<int,array{get?:string,name?:string,order?:string,search?:string,state?:int,url?:string,token?:string,
|
||||
* shareRss?:bool,shareOpml?:bool,description?:string,imageUrl?:string}> 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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user