Revert "Don't use /etc/icingaweb2 as config path on Windows"

This reverts commit 48870bb7e2.
This commit is contained in:
Alexander A. Klimov 2015-06-12 13:29:36 +02:00
parent b58ffbe034
commit 7ea6eeb20d
1 changed files with 3 additions and 5 deletions

View File

@ -134,20 +134,18 @@ abstract class ApplicationBootstrap
$this->vendorDir = $baseDir . '/library/vendor';
$this->libDir = realpath(__DIR__ . '/../..');
$this->setupAutoloader();
if ($configDir === null) {
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
} else {
$configDir = Platform::isWindows()
? $baseDir . DIRECTORY_SEPARATOR . 'config'
: '/etc/icingaweb2';
$configDir = '/etc/icingaweb2';
}
}
$canonical = realpath($configDir);
$this->configDir = $canonical ? $canonical : $configDir;
$this->setupAutoloader();
set_include_path(
implode(
PATH_SEPARATOR,