From 09545b0a654c6bec9ddae9632de71860e8b07c08 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 7 Jan 2015 15:37:24 +0100 Subject: Fix calls to remove_query_by_get() The function has been moved into lib_rss.php See https://github.com/FreshRSS/FreshRSS/issues/730 --- lib/lib_rss.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib') 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; +} -- cgit v1.2.3