aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Configuration.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-02-19 20:19:11 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-02-19 20:19:11 +0100
commit3aeea28ac7a1aa0bd07f23b1639c14985ff241ad (patch)
tree48e391d1aee6db4797cc46bd23ffb4dce311f46b /lib/Minz/Configuration.php
parent165eb57459a152b3cc6aa3fd15ca990c3d908829 (diff)
parent04da549e2e52980ccc72689c32793222be76279d (diff)
Merge branch 'dev'
Diffstat (limited to 'lib/Minz/Configuration.php')
-rw-r--r--lib/Minz/Configuration.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php
index 572b9984d..b3de9e39e 100644
--- a/lib/Minz/Configuration.php
+++ b/lib/Minz/Configuration.php
@@ -52,6 +52,7 @@ class Minz_Configuration {
private static $delay_cache = 3600;
private static $default_user = '';
private static $allow_anonymous = false;
+ private static $allow_anonymous_refresh = false;
private static $auth_type = 'none';
private static $db = array (
@@ -118,6 +119,9 @@ class Minz_Configuration {
public static function allowAnonymous() {
return self::$allow_anonymous;
}
+ public static function allowAnonymousRefresh() {
+ return self::$allow_anonymous_refresh;
+ }
public static function authType() {
return self::$auth_type;
}
@@ -131,6 +135,9 @@ class Minz_Configuration {
public static function _allowAnonymous($allow = false) {
self::$allow_anonymous = ((bool)$allow) && self::canLogIn();
}
+ public static function _allowAnonymousRefresh($allow = false) {
+ self::$allow_anonymous_refresh = ((bool)$allow) && self::allowAnonymous();
+ }
public static function _authType($value) {
$value = strtolower($value);
switch ($value) {
@@ -170,6 +177,7 @@ class Minz_Configuration {
'title' => self::$title,
'default_user' => self::$default_user,
'allow_anonymous' => self::$allow_anonymous,
+ 'allow_anonymous_refresh' => self::$allow_anonymous_refresh,
'auth_type' => self::$auth_type,
),
'db' => self::$db,
@@ -276,7 +284,16 @@ class Minz_Configuration {
self::_authType($general['auth_type']);
}
if (isset ($general['allow_anonymous'])) {
- self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no');
+ self::$allow_anonymous = (
+ ((bool)($general['allow_anonymous'])) &&
+ ($general['allow_anonymous'] !== 'no')
+ );
+ }
+ if (isset ($general['allow_anonymous_refresh'])) {
+ self::$allow_anonymous_refresh = (
+ ((bool)($general['allow_anonymous_refresh'])) &&
+ ($general['allow_anonymous_refresh'] !== 'no')
+ );
}
// Base de données