mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
🎨 Config file code formating
This commit is contained in:
@@ -70,14 +70,14 @@ define('DEFAULT_ALLOWED_LOGIN_TYPES', 'form|external|basic');
|
|||||||
define('DEFAULT_EXT_AUTH_VARIABLE', '$_SERVER[\'REMOTE_USER\']');
|
define('DEFAULT_EXT_AUTH_VARIABLE', '$_SERVER[\'REMOTE_USER\']');
|
||||||
define('DEFAULT_ENCRYPTION_KEY', '@iT0pEncr1pti0n!'); // We'll use a random generated key later (if possible)
|
define('DEFAULT_ENCRYPTION_KEY', '@iT0pEncr1pti0n!'); // We'll use a random generated key later (if possible)
|
||||||
define('DEFAULT_ENCRYPTION_LIB', 'Mcrypt'); // We'll define the best encryption available later
|
define('DEFAULT_ENCRYPTION_LIB', 'Mcrypt'); // We'll define the best encryption available later
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Config
|
* Config
|
||||||
* configuration data (this class cannot not be localized, because it is responsible for loading the dictionaries)
|
* configuration data (this class cannot not be localized, because it is responsible for loading the dictionaries)
|
||||||
*
|
*
|
||||||
* @package iTopORM
|
|
||||||
*
|
|
||||||
* @see \MetaModel::GetConfig() to get the config, if the metamodel was already loaded
|
* @see \MetaModel::GetConfig() to get the config, if the metamodel was already loaded
|
||||||
* @see utils::GetConfig() to load config from the current env, if metamodel is not loaded
|
* @see utils::GetConfig() to load config from the current env, if metamodel is not loaded
|
||||||
|
* @package iTopORM
|
||||||
*/
|
*/
|
||||||
class Config
|
class Config
|
||||||
{
|
{
|
||||||
@@ -588,7 +588,7 @@ class Config
|
|||||||
'Asia/Istanbul',
|
'Asia/Istanbul',
|
||||||
'Asia/Singapore',
|
'Asia/Singapore',
|
||||||
'Africa/Casablanca',
|
'Africa/Casablanca',
|
||||||
'Australia/Sydney'
|
'Australia/Sydney',
|
||||||
),
|
),
|
||||||
'default' => 'Europe/Paris',
|
'default' => 'Europe/Paris',
|
||||||
'value' => 'Europe/Paris',
|
'value' => 'Europe/Paris',
|
||||||
@@ -1575,12 +1575,14 @@ class Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sModule
|
* @see \MetaModel::GetModuleParameter()
|
||||||
|
*
|
||||||
* @param string $sProperty
|
* @param string $sProperty
|
||||||
* @param mixed $defaultvalue
|
* @param mixed $defaultvalue
|
||||||
*
|
*
|
||||||
|
* @param string $sModule
|
||||||
|
*
|
||||||
* @return mixed|null if present, value defined in the configuration file, if not module parameter from XML
|
* @return mixed|null if present, value defined in the configuration file, if not module parameter from XML
|
||||||
* @see \MetaModel::GetModuleParameter()
|
|
||||||
*/
|
*/
|
||||||
public function GetModuleSetting($sModule, $sProperty, $defaultvalue = null)
|
public function GetModuleSetting($sModule, $sProperty, $defaultvalue = null)
|
||||||
{
|
{
|
||||||
@@ -1594,12 +1596,14 @@ class Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sModule
|
* @see \MetaModel::GetModuleSetting() to get from the configuration file first
|
||||||
|
*
|
||||||
* @param string $sProperty
|
* @param string $sProperty
|
||||||
* @param mixed $defaultvalue
|
* @param mixed $defaultvalue
|
||||||
*
|
*
|
||||||
|
* @param string $sModule
|
||||||
|
*
|
||||||
* @return mixed|null parameter value defined in the XML
|
* @return mixed|null parameter value defined in the XML
|
||||||
* @see \MetaModel::GetModuleSetting() to get from the configuration file first
|
|
||||||
* @link https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Axml_reference#modules_parameters
|
* @link https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Axml_reference#modules_parameters
|
||||||
*/
|
*/
|
||||||
public function GetModuleParameter($sModule, $sProperty, $defaultvalue = null)
|
public function GetModuleParameter($sModule, $sProperty, $defaultvalue = null)
|
||||||
@@ -2059,9 +2063,12 @@ class Config
|
|||||||
$this->Set('db_tls.enabled', $bDbTlsEnabled, null);
|
$this->Set('db_tls.enabled', $bDbTlsEnabled, null);
|
||||||
}
|
}
|
||||||
$sDbTlsCa = $bDbTlsEnabled ? $aParamValues['db_tls_ca'] : null;
|
$sDbTlsCa = $bDbTlsEnabled ? $aParamValues['db_tls_ca'] : null;
|
||||||
if (isset($sDbTlsCa) && !empty($sDbTlsCa)) {
|
if (isset($sDbTlsCa) && !empty($sDbTlsCa))
|
||||||
|
{
|
||||||
$this->Set('db_tls.ca', $sDbTlsCa, 'UpdateFromParams');
|
$this->Set('db_tls.ca', $sDbTlsCa, 'UpdateFromParams');
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// empty parameter : we don't want it in the file
|
// empty parameter : we don't want it in the file
|
||||||
$this->Set('db_tls.ca', null, null);
|
$this->Set('db_tls.ca', null, null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user