mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 06:58:49 +02:00
Allow a module to provide a handler to override application settings: OnMetaModelStarted()
SVN:trunk[1010]
This commit is contained in:
@@ -174,28 +174,6 @@ class utils
|
||||
return file_get_contents($sFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the application config file
|
||||
* @param string path to the config file
|
||||
* @return void
|
||||
*/
|
||||
public static function SpecifyConfigFile($sFilePath)
|
||||
{
|
||||
self::$m_sConfigFile = $sFilePath;
|
||||
}
|
||||
/**
|
||||
* Get access to the application config file
|
||||
* @param none
|
||||
* @return Config The Config object initialized from the application config file
|
||||
*/
|
||||
public static function GetConfig()
|
||||
{
|
||||
if (self::$m_oConfig == null)
|
||||
{
|
||||
self::$m_oConfig = new Config(self::$m_sConfigFile);
|
||||
}
|
||||
return self::$m_oConfig;
|
||||
}
|
||||
/**
|
||||
* Helper function to convert a value expressed in a 'user friendly format'
|
||||
* as in php.ini, e.g. 256k, 2M, 1G etc. Into a number of bytes
|
||||
@@ -233,7 +211,7 @@ class utils
|
||||
{
|
||||
// Build an absolute URL to this page on this server/port
|
||||
$sServerName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
|
||||
if (self::GetConfig()->GetSecureConnectionRequired() || self::GetConfig()->GetHttpsHyperlinks())
|
||||
if (MetaModel::GetConfig()->GetSecureConnectionRequired() || MetaModel::GetConfig()->GetHttpsHyperlinks())
|
||||
{
|
||||
// If a secure connection is required, or if the URL is requested to start with HTTPS
|
||||
// then any URL must start with https !
|
||||
|
||||
Reference in New Issue
Block a user