packaging/config: allow to override APPDIR
It is now possible to either define ICINGAWEB_APPDIR in an Environment variable or to define it as a PHP constant before bootstrapping. fixes #6400
This commit is contained in:
parent
55880cb5a3
commit
bdc3423d4e
|
@ -133,8 +133,13 @@ abstract class ApplicationBootstrap
|
|||
define('ICINGA_LIBDIR', $this->libDir);
|
||||
}
|
||||
|
||||
// TODO: Make appdir configurable for packagers
|
||||
$this->appDir = realpath($this->libDir. '/../application');
|
||||
if (defined('ICINGAWEB_APPDIR')) {
|
||||
$this->appDir = ICINGAWEB_APPDIR;
|
||||
} elseif (array_key_exists('ICINGAWEB_APPDIR', $_SERVER)) {
|
||||
$this->appDir = $_SERVER['ICINGAWEB_APPDIR'];
|
||||
} else {
|
||||
$this->appDir = realpath($this->libDir. '/../application');
|
||||
}
|
||||
|
||||
if (!defined('ICINGAWEB_APPDIR')) {
|
||||
define('ICINGAWEB_APPDIR', $this->appDir);
|
||||
|
|
Loading…
Reference in New Issue