From fb32aa4ef1253573115766bc48068ea1a7db4082 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 17 Mar 2013 02:47:54 +0100 Subject: 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) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/RSSConfiguration.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'app/models/RSSConfiguration.php') 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) { -- cgit v1.2.3