Compute config file paths properly

fixes #6564
fixes #6534
This commit is contained in:
Alexander Klimov 2014-06-24 14:54:31 +02:00
parent 9bab7c0323
commit 6e4bf73c36
2 changed files with 4 additions and 1 deletions

View File

@ -152,6 +152,9 @@ abstract class ApplicationBootstrap
}
}
$this->configDir = realpath($configDir);
if (!$this->configDir) {
$this->configDir = '/etc/icingaweb';
}
$this->setupAutoloader();
$this->setupZendAutoloader();

View File

@ -169,7 +169,7 @@ class Config extends Zend_Config
throw new ProgrammingError('Windows support has not yet been implemented');
}
if (strpos($path, DIRECTORY_SEPARATOR) === 0 || self::$configDir === false) {
if (strpos(pathinfo($path, PATHINFO_DIRNAME), DIRECTORY_SEPARATOR) === 0) {
return $path;
}