From aac5d49eed69a661653a604c4f2671da3745e31d Mon Sep 17 00:00:00 2001 From: Paul Richards Date: Mon, 30 Mar 2015 23:09:24 +0100 Subject: [PATCH] IIS: use 'config' folder within icingaweb root instead of '/etc/icingaweb2' on Windows Signed-off-by: Alexander A. Klimov with the following changes: Make use of Platform::isWindows() Call ::setupAutoloader() before that fixes #8916 --- library/Icinga/Application/ApplicationBootstrap.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index e265b91ee..6f409789a 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -134,18 +134,20 @@ 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 = '/etc/icingaweb2'; + $configDir = Platform::isWindows() + ? $baseDir . '/config' + : '/etc/icingaweb2'; } } $canonical = realpath($configDir); $this->configDir = $canonical ? $canonical : $configDir; - $this->setupAutoloader(); - set_include_path( implode( PATH_SEPARATOR,