Do not load Zend on the CLI and remove our library from the include path
Adding Icinga Web 2's library to the include is not necessary for getting the Zend_Plugin_Loader working.
This commit is contained in:
parent
c1591bc641
commit
37dd2f5dd2
|
@ -13,7 +13,6 @@ use Icinga\Exception\NotReadableError;
|
|||
use Icinga\Application\Logger;
|
||||
use Icinga\Util\DateTimeFactory;
|
||||
use Icinga\Util\Translator;
|
||||
use Icinga\Util\TimezoneDetect;
|
||||
use Icinga\Exception\IcingaException;
|
||||
|
||||
/**
|
||||
|
@ -139,7 +138,6 @@ abstract class ApplicationBootstrap
|
|||
$this->configDir = $canonical ? $canonical : $configDir;
|
||||
|
||||
$this->setupAutoloader();
|
||||
$this->setupZendAutoloader();
|
||||
|
||||
set_include_path(
|
||||
implode(
|
||||
|
@ -323,7 +321,7 @@ abstract class ApplicationBootstrap
|
|||
/**
|
||||
* Register the Zend Autoloader
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
protected function setupZendAutoloader()
|
||||
{
|
||||
|
@ -331,17 +329,12 @@ abstract class ApplicationBootstrap
|
|||
|
||||
\Zend_Loader_Autoloader::getInstance();
|
||||
|
||||
// Unfortunately this is needed to get the Zend Plugin loader working:
|
||||
set_include_path(
|
||||
implode(
|
||||
PATH_SEPARATOR,
|
||||
array($this->libDir, get_include_path())
|
||||
)
|
||||
\Zend_Paginator::addScrollingStylePrefixPath(
|
||||
'Icinga_Web_Paginator_ScrollingStyle_', $this->libDir . '/Icinga/Web/Paginator/ScrollingStyle'
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup module manager
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue