aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Configuration.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-17 09:30:31 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-17 09:30:31 +0200
commitf5c863705ba63b124decb3769fc26798bf12a016 (patch)
treee0932e7f1524c64eaab877f37975e772a5cc1980 /app/Models/Configuration.php
parentfc5cae981f906bc887eaf053b1826f9153210423 (diff)
parent83832a39c4651bd3e4bfa007f75c91d040db79d3 (diff)
Merge branch 'reading-conf' of github.com:aledeg/FreshRSS into aledeg-reading-conf
Diffstat (limited to 'app/Models/Configuration.php')
-rw-r--r--app/Models/Configuration.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index e4408df73..e47b042c8 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';