Allow a module to provide a handler to override application settings: OnMetaModelStarted()

SVN:trunk[1010]
This commit is contained in:
Romain Quetiez
2010-12-06 09:14:20 +00:00
parent df8f4449e8
commit cde184e2a3
17 changed files with 123 additions and 63 deletions

View File

@@ -194,7 +194,7 @@ EOF
static function SecureConnectionRequired()
{
return utils::GetConfig()->GetSecureConnectionRequired();
return MetaModel::GetConfig()->GetSecureConnectionRequired();
}
static function IsConnectionSecure()
@@ -218,7 +218,7 @@ EOF
exit;
}
$aAllowedLoginTypes = utils::GetConfig()->GetAllowedLoginTypes();
$aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes();
if (isset($_SESSION['auth_user']))
{
@@ -266,7 +266,7 @@ EOF
case 'external':
// Web server supplied authentication
$bExternalAuth = false;
$sExtAuthVar = utils::GetConfig()->GetExternalAuthenticationVariable(); // In which variable is the info passed ?
$sExtAuthVar = MetaModel::GetConfig()->GetExternalAuthenticationVariable(); // In which variable is the info passed ?
$sEval = '$bExternalAuth = isset('.$sExtAuthVar.');';
eval($sEval);
if ($bExternalAuth)
@@ -339,7 +339,7 @@ EOF
static function DoLogin($bMustBeAdmin = false, $bIsAllowedToPortalUsers = false)
{
$operation = utils::ReadParam('loginop', '');
session_name(utils::GetConfig()->Get('session_name'));
session_name(MetaModel::GetConfig()->Get('session_name'));
session_start();
if ($operation == 'logoff')
@@ -350,7 +350,7 @@ EOF
}
else
{
$aAllowedLoginTypes = utils::GetConfig()->GetAllowedLoginTypes();
$aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes();
if (count($aAllowedLoginTypes) > 0)
{
$sLoginMode = $aAllowedLoginTypes[0];