packaging/configuration: get rid of _ENV

We should use _SERVER for our settings as it works fine on CLI and
for web servers.

refs #6400
This commit is contained in:
Thomas Gelf 2014-06-04 21:02:25 +00:00
parent 8fe804bbd4
commit e992f152bb
3 changed files with 1 additions and 4 deletions

View File

@ -143,8 +143,6 @@ abstract class ApplicationBootstrap
if ($configDir === null) { if ($configDir === null) {
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) { if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR']; $configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
} else if (array_key_exists('ICINGAWEB_CONFIGDIR', $_ENV)) {
$configDir = $_ENV['ICINGAWEB_CONFIGDIR'];
} else { } else {
$configDir = '/etc/icingaweb'; $configDir = '/etc/icingaweb';
} }

View File

@ -1,5 +1,4 @@
<?php <?php
$_ENV['ICINGAWEB_CONFIGDIR'] = '/etc/icingaweb';
require_once dirname(__DIR__). '/library/Icinga/Application/webrouter.php'; require_once dirname(__DIR__). '/library/Icinga/Application/webrouter.php';

View File

@ -1,4 +1,4 @@
<?php <?php
$_ENV['ICINGAWEB_CONFIGDIR'] = '@icingaweb_config_path@'; $_SERVER['ICINGAWEB_CONFIGDIR'] = '@icingaweb_config_path@';
require_once dirname(__DIR__). '/library/Icinga/Application/webrouter.php'; require_once dirname(__DIR__). '/library/Icinga/Application/webrouter.php';