mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-05-07 08:10:11 +02:00
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)
|
protected function __construct($configDir = null)
|
||||||
{
|
{
|
||||||
$this->libDir = realpath(__DIR__ . '/../..');
|
define('ICINGAWEB_BASEDIR', dirname($this->getBootstrapDirecory()));
|
||||||
|
|
||||||
if (! defined('ICINGAWEB_BASEDIR')) {
|
|
||||||
throw new LogicException('\'ICINGAWEB_BASEDIR\' is not defined');
|
|
||||||
}
|
|
||||||
define('ICINGAWEB_VENDORS', ICINGAWEB_BASEDIR . '/library/vendor');
|
define('ICINGAWEB_VENDORS', ICINGAWEB_BASEDIR . '/library/vendor');
|
||||||
define('ICINGAWEB_APPDIR', ICINGAWEB_BASEDIR . '/application');
|
define('ICINGAWEB_APPDIR', ICINGAWEB_BASEDIR . '/application');
|
||||||
|
|
||||||
|
$this->appDir = ICINGAWEB_APPDIR;
|
||||||
|
$this->libDir = realpath(__DIR__ . '/../..');
|
||||||
|
|
||||||
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'];
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
define('ICINGAWEB_BASEDIR', dirname(__DIR__));
|
if (! @include_once dirname(__DIR__) . '/library/Icinga/Application/webrouter.php') {
|
||||||
// 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 the Icinga library wasn't found under ICINGAWEB_BASEDIR, require that the Icinga library is found in PHP's
|
// 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
|
// include path which is the case if Icinga Web 2 is installed via packages
|
||||||
require_once 'Icinga/Application/webrouter.php';
|
require_once 'Icinga/Application/webrouter.php';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user