diff options
| author | 2013-03-17 02:47:54 +0100 | |
|---|---|---|
| committer | 2013-03-17 02:47:54 +0100 | |
| commit | fb32aa4ef1253573115766bc48068ea1a7db4082 (patch) | |
| tree | 60c7f10eabc9bd2de4ecf2278b0545a26622416b /app/models/RSSConfiguration.php | |
| parent | d63eddf0c5a563d11c880bb700dafc889ee87a3d (diff) | |
Amélioration affichage notifications + améliorations divers niveau affichage + ajout options pour auto-marquage des articles comme lus (à l'ouverture de l'article / du site / de la page)
Diffstat (limited to 'app/models/RSSConfiguration.php')
| -rwxr-xr-x | app/models/RSSConfiguration.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/models/RSSConfiguration.php b/app/models/RSSConfiguration.php index f32a67a3a..270ec2ce1 100755 --- a/app/models/RSSConfiguration.php +++ b/app/models/RSSConfiguration.php @@ -8,6 +8,7 @@ class RSSConfiguration extends Model { private $old_entries; private $shortcuts = array (); private $mail_login = ''; + private $mark_when = array (); public function __construct () { $confDAO = new RSSConfigurationDAO (); @@ -18,6 +19,7 @@ class RSSConfiguration extends Model { $this->_oldEntries ($confDAO->old_entries); $this->_shortcuts ($confDAO->shortcuts); $this->_mailLogin ($confDAO->mail_login); + $this->_markWhen ($confDAO->mark_when); } public function postsPerPage () { @@ -41,6 +43,18 @@ class RSSConfiguration extends Model { public function mailLogin () { return $this->mail_login; } + public function markWhen () { + return $this->mark_when; + } + public function markWhenArticle () { + return $this->mark_when['article']; + } + public function markWhenSite () { + return $this->mark_when['site']; + } + public function markWhenPage () { + return $this->mark_when['page']; + } public function _postsPerPage ($value) { if (is_int (intval ($value))) { @@ -89,6 +103,11 @@ class RSSConfiguration extends Model { $this->mail_login = false; } } + public function _markWhen ($values) { + $this->mark_when['article'] = $values['article']; + $this->mark_when['site'] = $values['site']; + $this->mark_when['page'] = $values['page']; + } } class RSSConfigurationDAO extends Model_array { @@ -107,6 +126,11 @@ class RSSConfigurationDAO extends Model_array { 'prev_page' => 'left', ); public $mail_login = ''; + public $mark_when = array ( + 'article' => 'yes', + 'site' => 'yes', + 'page' => 'no' + ); public function __construct () { parent::__construct (PUBLIC_PATH . '/data/Configuration.array.php'); @@ -132,6 +156,9 @@ class RSSConfigurationDAO extends Model_array { if (isset ($this->array['mail_login'])) { $this->mail_login = $this->array['mail_login']; } + if (isset ($this->array['mark_when'])) { + $this->mark_when = $this->array['mark_when']; + } } public function update ($values) { |
