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:
Eric Lippmann 2014-11-14 14:04:24 +01:00
parent c1591bc641
commit 37dd2f5dd2

View File

@ -13,7 +13,6 @@ use Icinga\Exception\NotReadableError;
use Icinga\Application\Logger; use Icinga\Application\Logger;
use Icinga\Util\DateTimeFactory; use Icinga\Util\DateTimeFactory;
use Icinga\Util\Translator; use Icinga\Util\Translator;
use Icinga\Util\TimezoneDetect;
use Icinga\Exception\IcingaException; use Icinga\Exception\IcingaException;
/** /**
@ -139,7 +138,6 @@ abstract class ApplicationBootstrap
$this->configDir = $canonical ? $canonical : $configDir; $this->configDir = $canonical ? $canonical : $configDir;
$this->setupAutoloader(); $this->setupAutoloader();
$this->setupZendAutoloader();
set_include_path( set_include_path(
implode( implode(
@ -323,7 +321,7 @@ abstract class ApplicationBootstrap
/** /**
* Register the Zend Autoloader * Register the Zend Autoloader
* *
* @return self * @return $this
*/ */
protected function setupZendAutoloader() protected function setupZendAutoloader()
{ {
@ -331,17 +329,12 @@ abstract class ApplicationBootstrap
\Zend_Loader_Autoloader::getInstance(); \Zend_Loader_Autoloader::getInstance();
// Unfortunately this is needed to get the Zend Plugin loader working: \Zend_Paginator::addScrollingStylePrefixPath(
set_include_path( 'Icinga_Web_Paginator_ScrollingStyle_', $this->libDir . '/Icinga/Web/Paginator/ScrollingStyle'
implode(
PATH_SEPARATOR,
array($this->libDir, get_include_path())
)
); );
return $this; return $this;
} }
/** /**
* Setup module manager * Setup module manager
* *