mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
parent
3e31ff65a4
commit
f2693613d1
@ -151,9 +151,9 @@ abstract class ApplicationBootstrap
|
||||
$configDir = '/etc/icingaweb';
|
||||
}
|
||||
}
|
||||
$this->configDir = realpath($configDir);
|
||||
if (!$this->configDir) {
|
||||
$this->configDir = '/etc/icingaweb';
|
||||
$canonical = realpath($configDir);
|
||||
if ($canonical) {
|
||||
$this->configDir = $canonical;
|
||||
}
|
||||
|
||||
$this->setupAutoloader();
|
||||
|
@ -165,16 +165,6 @@ class Config extends Zend_Config
|
||||
*/
|
||||
public static function resolvePath($path)
|
||||
{
|
||||
if (Platform::isWindows()) {
|
||||
throw new ProgrammingError('Windows support has not yet been implemented');
|
||||
}
|
||||
|
||||
if (strpos(dirname($path), DIRECTORY_SEPARATOR) === 0) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
$path = self::$configDir . DIRECTORY_SEPARATOR . $path;
|
||||
$canonical = realpath($path);
|
||||
return ($canonical === false) ? $path : $canonical;
|
||||
return self::$configDir . DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR);
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ abstract class PreferencesStore
|
||||
}
|
||||
|
||||
if ($type === 'Ini') {
|
||||
$config->location = $config->config_path;
|
||||
$config->location = IcingaConfig::resolvePath('preferences');
|
||||
} elseif ($type === 'Db') {
|
||||
$config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user