diff options
| author | 2015-01-07 15:37:24 +0100 | |
|---|---|---|
| committer | 2015-01-07 15:37:24 +0100 | |
| commit | 09545b0a654c6bec9ddae9632de71860e8b07c08 (patch) | |
| tree | b02e72cbd0980d9c7d778f512c301c7dc50e839a /lib/lib_rss.php | |
| parent | 0140448a562b97859be0b9a6e480e1f6aa4d1b1d (diff) | |
Fix calls to remove_query_by_get()
The function has been moved into lib_rss.php
See https://github.com/FreshRSS/FreshRSS/issues/730
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 14b6e854d..ffd56eae4 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -387,3 +387,20 @@ function recursive_unlink($dir) { } return rmdir($dir); } + + +/** + * Remove queries where $get is appearing. + * @param $get the get attribute which should be removed. + * @param $queries an array of queries. + * @return the same array whithout those where $get is appearing. + */ +function remove_query_by_get($get, $queries) { + $final_queries = array(); + foreach ($queries as $key => $query) { + if (empty($query['get']) || $query['get'] !== $get) { + $final_queries[$key] = $query; + } + } + return $final_queries; +} |
