aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Configuration.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-07-21 18:00:32 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-07-21 18:00:32 +0200
commit8d7ac978f9af4819fc788e7e0a514dc7ca9886d9 (patch)
treefcc7e399a5f628a904518b7b522b17cef67a76e1 /app/Models/Configuration.php
parenta4dac0f791ae6d34b64cee5a3fae1815f6f70a2b (diff)
parent73bbdaa015ec8596603fa88bd2cb03f85548e05e (diff)
Merge branch 'dev' into beta
Diffstat (limited to 'app/Models/Configuration.php')
-rw-r--r--app/Models/Configuration.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index 0d6666297..7596c54cd 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
@@ -19,6 +20,7 @@ class FreshRSS_Configuration {
'onread_jump_next' => true,
'lazyload' => true,
'sticky_post' => true,
+ 'reading_confirm' => false,
'sort_order' => 'DESC',
'anon_access' => false,
'mark_when' => array(
@@ -53,6 +55,7 @@ class FreshRSS_Configuration {
'bottomline_date' => true,
'bottomline_link' => true,
'sharing' => array(),
+ 'queries' => array(),
);
private $available_languages = array(
@@ -147,6 +150,9 @@ class FreshRSS_Configuration {
public function _sticky_post($value) {
$this->data['sticky_post'] = ((bool)$value) && $value !== 'no';
}
+ public function _reading_confirm($value) {
+ $this->data['reading_confirm'] = ((bool)$value) && $value !== 'no';
+ }
public function _sort_order ($value) {
$this->data['sort_order'] = $value === 'ASC' ? 'ASC' : 'DESC';
}
@@ -158,6 +164,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])) {
@@ -219,6 +229,18 @@ class FreshRSS_Configuration {
$this->data['sharing'][] = $value;
}
}
+ public function _queries ($values) {
+ $this->data['queries'] = array();
+ foreach ($values as $value) {
+ $value = array_filter($value);
+ $params = $value;
+ unset($params['name']);
+ unset($params['url']);
+ $value['url'] = Minz_Url::display(array('params' => $params));
+
+ $this->data['queries'][] = $value;
+ }
+ }
public function _theme($value) {
$this->data['theme'] = $value;
}