aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Configuration.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-06 00:09:31 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-06 00:09:31 +0200
commitbc8eb560afd50290745ea6a500c0f930df2559eb (patch)
tree476fe293b7d06841105bd5fbb211fd24861a87b0 /app/Models/Configuration.php
parentb48dc25963553e4596a5ca10a3c823e895fbfd92 (diff)
Add TTL to control feed freshness
https://github.com/marienfressinaud/FreshRSS/issues/250
Diffstat (limited to 'app/Models/Configuration.php')
-rw-r--r--app/Models/Configuration.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index ffd20deca..f2084b833 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -7,6 +7,7 @@ class FreshRSS_Configuration {
'language' => 'en',
'old_entries' => 3,
'keep_history_default' => 0,
+ 'ttl_default' => 3600,
'mail_login' => '',
'token' => '',
'passwordHash' => '', //CRYPT_BLOWFISH
@@ -159,6 +160,10 @@ class FreshRSS_Configuration {
$value = intval($value);
$this->data['keep_history_default'] = $value >= -1 ? $value : 0;
}
+ public function _ttl_default($value) {
+ $value = intval($value);
+ $this->data['ttl_default'] = $value >= -1 ? $value : 3600;
+ }
public function _shortcuts ($values) {
foreach ($values as $key => $value) {
if (isset($this->data['shortcuts'][$key])) {