From 83832a39c4651bd3e4bfa007f75c91d040db79d3 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 6 Sep 2014 11:32:52 -0400 Subject: Add a new configuration option Before, when you selected the option to display only unread articles, it shows read articles if no unread article were found. Now, this option is renamed to include information on fallback behavior and a new option is created to have the "only unread" behavior See #551 It is missing the german translation --- app/Models/Configuration.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 3a408faa5..92bab6ad9 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -141,7 +141,18 @@ class FreshRSS_Configuration { } } public function _default_view ($value) { - $this->data['default_view'] = $value === FreshRSS_Entry::STATE_ALL ? FreshRSS_Entry::STATE_ALL : FreshRSS_Entry::STATE_NOT_READ; + switch ($value): + case FreshRSS_Entry::STATE_ALL: + // left blank on purpose + case FreshRSS_Entry::STATE_NOT_READ: + // left blank on purpose + case FreshRSS_Entry::STATE_NOT_READ_STRICT: + $this->data['default_view'] = $value; + break; + default: + $this->data['default_view'] = FreshRSS_Entry::STATE_ALL; + break; + endswitch; } public function _display_posts ($value) { $this->data['display_posts'] = ((bool)$value) && $value !== 'no'; -- cgit v1.2.3