diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index 7f1667e5b..733cdbf83 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -378,21 +378,6 @@ abstract class ApplicationBootstrap return $this; } - /** - * Load all core modules - * - * @return self - */ - protected function loadCoreModules() - { - try { - $this->moduleManager->loadCoreModules(); - } catch (NotReadableError $e) { - Logger::error(new IcingaException('Cannot load core modules. An exception was thrown:', $e)); - } - return $this; - } - /** * Load all enabled modules * diff --git a/library/Icinga/Application/Modules/Manager.php b/library/Icinga/Application/Modules/Manager.php index 6469d3929..7ee2461f9 100644 --- a/library/Icinga/Application/Modules/Manager.php +++ b/library/Icinga/Application/Modules/Manager.php @@ -68,18 +68,6 @@ class Manager */ private $modulePaths = array(); - /** - * The core modules - * - * Core modules do not need to be enabled to load and cannot be disabled - * by the user. This must not be writable programmatically! - * - * @var array - */ - private $coreModules = array( - 'setup' - ); - /** * Create a new instance of the module manager * @@ -170,21 +158,7 @@ class Manager } /** - * Try to set all core modules in loaded state - * - * @return self - * @see Manager::loadModule() - */ - public function loadCoreModules() - { - foreach ($this->coreModules as $name) { - $this->loadModule($name); - } - return $this; - } - - /** - * Try to set all enabled modules in loaded state + * Try to set all enabled modules in loaded sate * * @return self * @see Manager::loadModule() @@ -239,8 +213,6 @@ class Manager 'Cannot enable module "%s". Module is not installed.', $name ); - } elseif (in_array($name, $this->coreModules)) { - return $this; } clearstatcache(true); @@ -458,7 +430,7 @@ class Manager } $installed = $this->listInstalledModules(); - foreach (array_diff($installed, $this->coreModules) as $name) { + foreach ($installed as $name) { $info[$name] = (object) array( 'name' => $name, 'path' => $this->installedBaseDirs[$name], diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 37ec5138a..a21f21025 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -104,7 +104,6 @@ class Web extends ApplicationBootstrap ->setupZendMvc() ->setupFormNamespace() ->setupModuleManager() - ->loadCoreModules() ->loadEnabledModules() ->setupRoute() ->setupPagination(); diff --git a/modules/translation/library/Translation/Util/GettextTranslationHelper.php b/modules/translation/library/Translation/Util/GettextTranslationHelper.php index 0d5a950e1..5702def85 100644 --- a/modules/translation/library/Translation/Util/GettextTranslationHelper.php +++ b/modules/translation/library/Translation/Util/GettextTranslationHelper.php @@ -101,7 +101,7 @@ class GettextTranslationHelper */ public function __construct(ApplicationBootstrap $bootstrap, $locale) { - $this->moduleMgr = $bootstrap->getModuleManager()->loadCoreModules()->loadEnabledModules(); + $this->moduleMgr = $bootstrap->getModuleManager()->loadEnabledModules(); $this->appDir = $bootstrap->getApplicationDir(); $this->locale = $locale; }