Do not define ICINGAWEB_BASEDIR in index.php
There's SCRIPT_FILENAME. The constants will be removed shortly.
This commit is contained in:
parent
826cfbeceb
commit
6089372c42
|
@ -101,14 +101,13 @@ abstract class ApplicationBootstrap
|
|||
*/
|
||||
protected function __construct($configDir = null)
|
||||
{
|
||||
$this->libDir = realpath(__DIR__ . '/../..');
|
||||
|
||||
if (! defined('ICINGAWEB_BASEDIR')) {
|
||||
throw new LogicException('\'ICINGAWEB_BASEDIR\' is not defined');
|
||||
}
|
||||
define('ICINGAWEB_BASEDIR', dirname($this->getBootstrapDirecory()));
|
||||
define('ICINGAWEB_VENDORS', ICINGAWEB_BASEDIR . '/library/vendor');
|
||||
define('ICINGAWEB_APPDIR', ICINGAWEB_BASEDIR . '/application');
|
||||
|
||||
$this->appDir = ICINGAWEB_APPDIR;
|
||||
$this->libDir = realpath(__DIR__ . '/../..');
|
||||
|
||||
if ($configDir === null) {
|
||||
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
|
||||
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
define('ICINGAWEB_BASEDIR', dirname(__DIR__));
|
||||
// ICINGAWEB_BASEDIR is the parent folder for at least application, bin, modules, library/vendor and public
|
||||
|
||||
|
||||
if (! @include_once ICINGAWEB_BASEDIR . '/library/Icinga/Application/webrouter.php') {
|
||||
if (! @include_once dirname(__DIR__) . '/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