diff options
| author | 2013-12-25 20:58:38 +0100 | |
|---|---|---|
| committer | 2013-12-25 20:58:38 +0100 | |
| commit | 7b4451912e2a9008a49854a2496cf9bb99b7ed10 (patch) | |
| tree | 99b6c2173bb0b8a528050aac6fab4e633f6be355 /app/Models/Configuration.php | |
| parent | 318954dfbd64f7a29203cdb25a95400dea0cec0d (diff) | |
| parent | 7eda2793bbc3210ae37aa66511fd7ad7661c2149 (diff) | |
Merge remote-tracking branch 'origin/dev' into beta
Diffstat (limited to 'app/Models/Configuration.php')
| -rw-r--r-- | app/Models/Configuration.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index d5f69601f..47509636f 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -14,6 +14,7 @@ class FreshRSS_Configuration extends Minz_Model { private $lazyload; private $sort_order; private $old_entries; + private $keep_history_default; private $shortcuts = array (); private $mail_login = ''; private $mark_when = array (); @@ -44,6 +45,7 @@ class FreshRSS_Configuration extends Minz_Model { $this->_lazyload ($confDAO->lazyload); $this->_sortOrder ($confDAO->sort_order); $this->_oldEntries ($confDAO->old_entries); + $this->_keepHistoryDefault($confDAO->keep_history_default); $this->_shortcuts ($confDAO->shortcuts); $this->_mailLogin ($confDAO->mail_login); $this->_markWhen ($confDAO->mark_when); @@ -95,6 +97,9 @@ class FreshRSS_Configuration extends Minz_Model { public function oldEntries () { return $this->old_entries; } + public function keepHistoryDefault() { + return $this->keep_history_default; + } public function shortcuts () { return $this->shortcuts; } @@ -217,11 +222,18 @@ class FreshRSS_Configuration extends Minz_Model { } public function _oldEntries ($value) { if (ctype_digit ($value) && $value > 0) { - $this->old_entries = $value; + $this->old_entries = intval($value); } else { $this->old_entries = 3; } } + public function _keepHistoryDefault($value) { + if (ctype_digit($value) && $value >= -1) { + $this->keep_history_default = intval($value); + } else { + $this->keep_history_default = 0; + } + } public function _shortcuts ($values) { foreach ($values as $key => $value) { $this->shortcuts[$key] = $value; |
