From 8521c876d4b2ce69ff5d4313493017f26aa2cd6b Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 4 May 2014 08:57:19 -0400 Subject: Add user queries It's an intermediary step to remove the favorite button. I add a button to store the current query as a favorite query. It redirects automatically to the configuration page where it is possible to name and remove user queries. To make the queries more straigtforward, I removed the default behavior when searching for a string. This way, when we search for a string, the filter is not defaulted to all articles. --- app/Models/Configuration.php | 7 +++++++ app/Models/Themes.php | 1 + 2 files changed, 8 insertions(+) (limited to 'app/Models') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 8d3e69a1c..deeae0826 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -52,6 +52,7 @@ class FreshRSS_Configuration { 'bottomline_date' => true, 'bottomline_link' => true, 'sharing' => array(), + 'queries' => array(), ); private $available_languages = array( @@ -218,6 +219,12 @@ class FreshRSS_Configuration { $this->data['sharing'][] = $value; } } + public function _queries ($values) { + $this->data['queries'] = array(); + foreach ($values as $value) { + $this->data['queries'][] = array_filter($value); + } + } public function _theme($value) { $this->data['theme'] = $value; } diff --git a/app/Models/Themes.php b/app/Models/Themes.php index 17b95bb9e..5fcbe78e0 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -70,6 +70,7 @@ class FreshRSS_Themes extends Minz_Model { 'add' => '✚', 'all' => '☰', 'bookmark' => '★', + 'bookmark-add' => '✚', 'category' => '☷', 'category-white' => '☷', 'close' => '❌', -- cgit v1.2.3