summaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-07 15:37:24 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-07 15:37:24 +0100
commit09545b0a654c6bec9ddae9632de71860e8b07c08 (patch)
treeb02e72cbd0980d9c7d778f512c301c7dc50e839a /lib/lib_rss.php
parent0140448a562b97859be0b9a6e480e1f6aa4d1b1d (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.php17
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;
+}