aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Configuration.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-02-24 19:51:57 -0500
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-02-24 19:51:57 -0500
commit1e105a64ab12b37f55b605a89e869f7bbb520e95 (patch)
tree24d3161f22e616b40da5e58a6f2cc20fc6533405 /app/Models/Configuration.php
parent166009f3623213249086038f7af72a76507f60dc (diff)
Add a configuration option to get sticky articles
Now the user can choose if an opened article will be repositioned to the top or not See #338
Diffstat (limited to 'app/Models/Configuration.php')
-rw-r--r--app/Models/Configuration.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index bacb79510..48efe3bf6 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -17,6 +17,7 @@ class FreshRSS_Configuration {
'display_posts' => false,
'onread_jump_next' => true,
'lazyload' => true,
+ 'sticky_post' => true,
'sort_order' => 'DESC',
'anon_access' => false,
'mark_when' => array(
@@ -140,6 +141,9 @@ class FreshRSS_Configuration {
public function _lazyload ($value) {
$this->data['lazyload'] = ((bool)$value) && $value !== 'no';
}
+ public function _sticky_post($value) {
+ $this->data['sticky_post'] = ((bool)$value) && $value !== 'no';
+ }
public function _sort_order ($value) {
$this->data['sort_order'] = $value === 'ASC' ? 'ASC' : 'DESC';
}