diff options
| author | 2014-09-24 13:28:09 +0200 | |
|---|---|---|
| committer | 2014-09-24 13:28:09 +0200 | |
| commit | 5a1baff9be7cf9fe3f59fe2a7dc34fbadacc1a99 (patch) | |
| tree | 48a47ca2103a7be2c48b5049460e34fb3d231351 /app/Models/Configuration.php | |
| parent | 666162ae56c2df8ae6a7ed6602b69f6caad10c7c (diff) | |
Refactor removing query by get param
See https://github.com/marienfressinaud/FreshRSS/issues/625
Diffstat (limited to 'app/Models/Configuration.php')
| -rw-r--r-- | app/Models/Configuration.php | 10 |
1 files changed, 10 insertions, 0 deletions
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'; |
