Merge branch 'master' into feature/setup-wizard-7163
This commit is contained in:
commit
b27d1d0058
|
@ -1,6 +1,17 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
use Icinga\Application\Cli;
|
||||
require_once dirname(__DIR__) . '/library/Icinga/Application/Cli.php';
|
||||
Cli::start()->dispatch();
|
||||
<?php
|
||||
// {{{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/Cli.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/Cli.php';
|
||||
}
|
||||
|
||||
Icinga\Application\Cli::start()->dispatch();
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Icinga\Application;
|
|||
|
||||
use ErrorException;
|
||||
use Exception;
|
||||
use LogicException;
|
||||
use Icinga\Application\Modules\Manager as ModuleManager;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
|
@ -101,24 +102,15 @@ abstract class ApplicationBootstrap
|
|||
*/
|
||||
protected function __construct($configDir = null)
|
||||
{
|
||||
if (! defined('ICINGAWEB_BASEDIR')) {
|
||||
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 (!defined('ICINGA_LIBDIR')) {
|
||||
define('ICINGA_LIBDIR', $this->libDir);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
if ($configDir === null) {
|
||||
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
|
||||
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
|
||||
|
@ -416,7 +408,7 @@ abstract class ApplicationBootstrap
|
|||
*/
|
||||
protected function setupLogger()
|
||||
{
|
||||
if (($loggingConfig = $this->config->get('logging')) !== null) {
|
||||
if (($loggingConfig = $this->config->logging) !== null) {
|
||||
try {
|
||||
Logger::create($loggingConfig);
|
||||
} catch (ConfigurationError $e) {
|
||||
|
|
|
@ -79,7 +79,7 @@ abstract class Filter
|
|||
}
|
||||
}
|
||||
|
||||
krsort($operators, SORT_NATURAL);
|
||||
krsort($operators, version_compare(PHP_VERSION, '5.4.0') >= 0 ? SORT_NATURAL : SORT_REGULAR);
|
||||
foreach ($operators as $id => $operator) {
|
||||
$f = $filter->getById($id);
|
||||
if ($f->getOperatorName() !== $operator) {
|
||||
|
|
|
@ -201,7 +201,7 @@ class Tab extends AbstractWidget
|
|||
$caption = $view->escape($this->title);
|
||||
|
||||
if ($this->icon !== null) {
|
||||
$caption = $view->img($this->icon, array('class' => 'icon')) . ' ' . $caption;
|
||||
$caption = $view->img($this->icon, array('class' => 'icon')) . $caption;
|
||||
}
|
||||
if ($this->url !== null) {
|
||||
$this->url->overwriteParams($this->urlParams);
|
||||
|
|
|
@ -2,4 +2,8 @@
|
|||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
require_once dirname(__DIR__). '/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