Level up index.php
This is the preparation for having the Icinga library in PHP's include path.
This commit is contained in:
parent
877e9101f3
commit
32d483f69f
|
@ -2,4 +2,12 @@
|
|||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
require_once dirname(__DIR__). '/library/Icinga/Application/webrouter.php';
|
||||
define('ICINGAWEB_BASEDIR', dirname(__DIR__));
|
||||
// ICINGAWEB_BASEDIR is the parent folder for at least application, bin, modules and public
|
||||
|
||||
|
||||
if (! @include_once ICINGAWEB_BASEDIR . '/library/Icinga/Application/webrouter.php') {
|
||||
// If the Icinga library wasn't found under ICINGAWEB_BASEDIR, require that the Icinga library is found in PHP's
|
||||
// include path which is the case if Icinga Web 2 is installed via packages
|
||||
require_once 'Icinga/Application/webrouter.php';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue