aboutsummaryrefslogtreecommitdiff
path: root/app/models/RSSConfiguration.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-03 19:13:41 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-03 19:13:41 +0100
commit0425432271fb709d94194cfd5ca922038c175573 (patch)
tree668891d30d9a4e3568cbce9b8a2fdd982bf01872 /app/models/RSSConfiguration.php
parented0535b0b0830066ae71b914eff2a5a31f575ec9 (diff)
Option pour marquer les articles comme lus dès la réception
https://github.com/marienfressinaud/FreshRSS/issues/237 https://github.com/marienfressinaud/FreshRSS/issues/309
Diffstat (limited to 'app/models/RSSConfiguration.php')
-rwxr-xr-xapp/models/RSSConfiguration.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/app/models/RSSConfiguration.php b/app/models/RSSConfiguration.php
index 5458ba2f3..f3fc3b4f1 100755
--- a/app/models/RSSConfiguration.php
+++ b/app/models/RSSConfiguration.php
@@ -113,6 +113,9 @@ class RSSConfiguration extends Model {
public function markWhenScroll () {
return $this->mark_when['scroll'];
}
+ public function markUponReception () {
+ return $this->mark_when['reception'];
+ }
public function sharing ($key = false) {
if ($key === false) {
return $this->sharing;
@@ -171,11 +174,8 @@ class RSSConfiguration extends Model {
$this->language = $value;
}
public function _postsPerPage ($value) {
- if (ctype_digit ($value) && $value > 0) {
- $this->posts_per_page = $value;
- } else {
- $this->posts_per_page = 10;
- }
+ $value = intval($value);
+ $this->posts_per_page = $value > 0 ? $value : 10;
}
public function _viewMode ($value) {
if ($value == 'global' || $value == 'reader') {
@@ -244,10 +244,14 @@ class RSSConfiguration extends Model {
if(!isset($values['scroll'])) {
$values['scroll'] = 'yes';
}
+ if(!isset($values['reception'])) {
+ $values['reception'] = 'no';
+ }
$this->mark_when['article'] = $values['article'];
$this->mark_when['site'] = $values['site'];
$this->mark_when['scroll'] = $values['scroll'];
+ $this->mark_when['reception'] = $values['reception'];
}
public function _sharing ($values) {
$are_url = array ('shaarli', 'poche', 'diaspora');
@@ -345,7 +349,8 @@ class RSSConfigurationDAO extends Model_array {
public $mark_when = array (
'article' => 'yes',
'site' => 'yes',
- 'scroll' => 'no'
+ 'scroll' => 'no',
+ 'reception' => 'no'
);
public $sharing = array (
'shaarli' => '',