From 5a1baff9be7cf9fe3f59fe2a7dc34fbadacc1a99 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 24 Sep 2014 13:28:09 +0200 Subject: Refactor removing query by get param See https://github.com/marienfressinaud/FreshRSS/issues/625 --- app/Models/Configuration.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/Models') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index ea1556cbb..91d2ab846 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -124,6 +124,16 @@ class FreshRSS_Configuration { return $this->available_languages; } + public function remove_query_by_get($get) { + $final_queries = array(); + foreach ($this->queries as $key => $query) { + if (empty($query['get']) || $query['get'] !== $get) { + $final_queries[$key] = $query; + } + } + $this->_queries($final_queries); + } + public function _language($value) { if (!isset($this->available_languages[$value])) { $value = 'en'; -- cgit v1.2.3