aboutsummaryrefslogtreecommitdiff
path: root/app/models/RSSConfiguration.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-07-27 13:58:58 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-07-27 13:58:58 +0200
commit22febc135134511b43a8543ea45c49c7aeec6f84 (patch)
treee2596663533d36ec017fc1c7e8730245d6de0d19 /app/models/RSSConfiguration.php
parentc4dcda6b47594a543046602056c5b7c27df70e39 (diff)
Fix issue #101 : option interdiction anonymes
Ajout d'une option pour interdire la lecture anonyme (interdit par défaut) Correction de l'internationalisation pour la pagination des logs
Diffstat (limited to 'app/models/RSSConfiguration.php')
-rwxr-xr-xapp/models/RSSConfiguration.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/models/RSSConfiguration.php b/app/models/RSSConfiguration.php
index dde120e4a..798ce2d0c 100755
--- a/app/models/RSSConfiguration.php
+++ b/app/models/RSSConfiguration.php
@@ -17,6 +17,8 @@ class RSSConfiguration extends Model {
private $mail_login = '';
private $mark_when = array ();
private $url_shaarli = '';
+ private $theme;
+ private $anon_access;
public function __construct () {
$confDAO = new RSSConfigurationDAO ();
@@ -32,6 +34,8 @@ class RSSConfiguration extends Model {
$this->_mailLogin ($confDAO->mail_login);
$this->_markWhen ($confDAO->mark_when);
$this->_urlShaarli ($confDAO->url_shaarli);
+ $this->_theme ($confDAO->theme);
+ $this->_anonAccess ($confDAO->anon_access);
}
public function availableLanguages () {
@@ -82,6 +86,12 @@ class RSSConfiguration extends Model {
public function urlShaarli () {
return $this->url_shaarli;
}
+ public function theme () {
+ return $this->theme;
+ }
+ public function anonAccess () {
+ return $this->anon_access;
+ }
public function _language ($value) {
if (!isset ($this->available_languages[$value])) {
@@ -171,6 +181,16 @@ class RSSConfiguration extends Model {
$this->url_shaarli = $value;
}
}
+ public function _theme ($value) {
+ $this->theme = $value;
+ }
+ public function _anonAccess ($value) {
+ if ($value == 'yes') {
+ $this->anon_access = 'yes';
+ } else {
+ $this->anon_access = 'no';
+ }
+ }
}
class RSSConfigurationDAO extends Model_array {
@@ -198,6 +218,8 @@ class RSSConfigurationDAO extends Model_array {
'scroll' => 'no'
);
public $url_shaarli = '';
+ public $theme = 'default';
+ public $anon_access = 'no';
public function __construct () {
parent::__construct (PUBLIC_PATH . '/data/Configuration.array.php');
@@ -238,6 +260,12 @@ class RSSConfigurationDAO extends Model_array {
if (isset ($this->array['url_shaarli'])) {
$this->url_shaarli = $this->array['url_shaarli'];
}
+ if (isset ($this->array['theme'])) {
+ $this->theme = $this->array['theme'];
+ }
+ if (isset ($this->array['anon_access'])) {
+ $this->anon_access = $this->array['anon_access'];
+ }
}
public function update ($values) {