aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Configuration.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-27 14:52:56 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-27 14:52:56 +0100
commitf52ccf7038199f1eb2f82d7e1f26d2a10caa867b (patch)
tree7c8235198b6b587574b41175a167103d31740a9a /app/Models/Configuration.php
parent7b4451912e2a9008a49854a2496cf9bb99b7ed10 (diff)
parentb99979cef78f7cd0c1cb4ae81115d09881e85926 (diff)
Merge remote-tracking branch 'origin/dev' into beta
Diffstat (limited to 'app/Models/Configuration.php')
-rw-r--r--app/Models/Configuration.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index 47509636f..cb2f90655 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -220,19 +220,13 @@ class FreshRSS_Configuration extends Minz_Model {
public function _sortOrder ($value) {
$this->sort_order = $value === 'ASC' ? 'ASC' : 'DESC';
}
- public function _oldEntries ($value) {
- if (ctype_digit ($value) && $value > 0) {
- $this->old_entries = intval($value);
- } else {
- $this->old_entries = 3;
- }
+ public function _oldEntries($value) {
+ $value = intval($value);
+ $this->old_entries = $value > 0 ? $value : 3;
}
public function _keepHistoryDefault($value) {
- if (ctype_digit($value) && $value >= -1) {
- $this->keep_history_default = intval($value);
- } else {
- $this->keep_history_default = 0;
- }
+ $value = intval($value);
+ $this->keep_history_default = $value >= -1 ? $value : 0;
}
public function _shortcuts ($values) {
foreach ($values as $key => $value) {