From 7dbede12fb8d2621b6f51fe10d93d3b0a17fcfc3 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 14 Feb 2014 13:37:45 +0000 Subject: [PATCH] Remove obsolete register script traces --- .../Icinga/Application/Modules/Manager.php | 1 - library/Icinga/Application/Modules/Module.php | 43 ++++++------------- modules/monitoring/register.php | 6 --- 3 files changed, 12 insertions(+), 38 deletions(-) delete mode 100644 modules/monitoring/register.php diff --git a/library/Icinga/Application/Modules/Manager.php b/library/Icinga/Application/Modules/Manager.php index 356e3458e..d0bd77ab4 100644 --- a/library/Icinga/Application/Modules/Manager.php +++ b/library/Icinga/Application/Modules/Manager.php @@ -274,7 +274,6 @@ class Manager $this->enabledDirs[$name] = $link; $this->loadModule($name); - $this->getModule($name)->launchRegisterScript(); return $this; } diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 4e6aa7f5a..c10ae67a2 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -101,13 +101,6 @@ class Module */ private $runScript; - /** - * Module initialization script - * - * @var string - */ - private $registerScript; - /** * Module configuration script * @@ -152,18 +145,17 @@ class Module */ public function __construct(ApplicationBootstrap $app, $name, $basedir) { - $this->app = $app; - $this->name = $name; - $this->basedir = $basedir; - $this->cssdir = $basedir . '/public/css'; - $this->libdir = $basedir . '/library'; - $this->configdir = $basedir . '/config'; - $this->localedir = $basedir . '/application/locale'; - $this->formdir = $basedir . '/application/forms'; - $this->controllerdir = $basedir . '/application/controllers'; - $this->runScript = $basedir . '/run.php'; - $this->registerScript = $basedir . '/register.php'; - $this->configScript = $basedir . '/configuration.php'; + $this->app = $app; + $this->name = $name; + $this->basedir = $basedir; + $this->cssdir = $basedir . '/public/css'; + $this->libdir = $basedir . '/library'; + $this->configdir = $basedir . '/config'; + $this->localedir = $basedir . '/application/locale'; + $this->formdir = $basedir . '/application/forms'; + $this->controllerdir = $basedir . '/application/controllers'; + $this->runScript = $basedir . '/run.php'; + $this->configScript = $basedir . '/configuration.php'; } /** @@ -511,16 +503,6 @@ class Module return $this; } - /** - * Run module registration script - * - * @return self - */ - public function launchRegisterScript() - { - return $this->includeScript($this->registerScript); - } - /** * Run module bootstrap script * @@ -540,14 +522,13 @@ class Module */ protected function includeScript($file) { - if (is_readable($file) === true) { + if (file_exists($file) && is_readable($file) === true) { include($file); } return $this; } - /** * Run module config script */ diff --git a/modules/monitoring/register.php b/modules/monitoring/register.php deleted file mode 100644 index d6267c22f..000000000 --- a/modules/monitoring/register.php +++ /dev/null @@ -1,6 +0,0 @@ -