loadConfig returns config that was actually applied
This commit is contained in:
parent
54415c113b
commit
301e481fbe
|
|
@ -424,19 +424,21 @@ class Settings
|
||||||
if ($configFile !== null) {
|
if ($configFile !== null) {
|
||||||
$config = @parse_ini_file($configFile);
|
$config = @parse_ini_file($configFile);
|
||||||
if ($config === false) {
|
if ($config === false) {
|
||||||
return $config;
|
return array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set config value
|
// Set config value
|
||||||
|
$appliedConfig = array();
|
||||||
foreach ($config as $key => $value) {
|
foreach ($config as $key => $value) {
|
||||||
$method = "set{$key}";
|
$method = "set{$key}";
|
||||||
if (method_exists(__CLASS__, $method)) {
|
if (method_exists(__CLASS__, $method)) {
|
||||||
self::$method($value);
|
self::$method($value);
|
||||||
|
$appliedConfig[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $config;
|
return $appliedConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue