Internally rename module registerscript to runScript

We will probably rename the 'register' script itself, as we need to
distinct between setup/configuration-related tasks and tasks that need
to be executed with each single click.

refs #4108
This commit is contained in:
Thomas Gelf 2014-01-22 09:54:59 +00:00
parent aa1a2316cb
commit 30208c3a30
1 changed files with 11 additions and 11 deletions

View File

@ -29,8 +29,8 @@
namespace Icinga\Application\Modules; namespace Icinga\Application\Modules;
use \Exception; use Exception;
use \Zend_Controller_Router_Route as Route; use Zend_Controller_Router_Route as Route;
use Icinga\Application\ApplicationBootstrap; use Icinga\Application\ApplicationBootstrap;
use Icinga\Application\Config; use Icinga\Application\Config;
use Icinga\Application\Icinga; use Icinga\Application\Icinga;
@ -98,7 +98,7 @@ class Module
* *
* @var string * @var string
*/ */
private $registerscript; private $runScript;
/** /**
* Icinga application * Icinga application
@ -125,7 +125,7 @@ class Module
$this->localedir = $basedir. '/application/locale'; $this->localedir = $basedir. '/application/locale';
$this->formdir = $basedir. '/application/forms'; $this->formdir = $basedir. '/application/forms';
$this->controllerdir = $basedir. '/application/controllers'; $this->controllerdir = $basedir. '/application/controllers';
$this->registerscript = $basedir. '/register.php'; $this->runScript = $basedir. '/register.php';
} }
/** /**
@ -138,11 +138,11 @@ class Module
$this->registerAutoloader() $this->registerAutoloader()
->registerWebIntegration(); ->registerWebIntegration();
try { try {
$this->runRegisterScript(); $this->launchRunScript();
} catch (Exception $e) { } catch (Exception $e) {
Logger::warn( Logger::warn(
'Running the register script %s for module %s failed with the following exception: %s', 'Launching the run script %s for module %s failed with the following exception: %s',
$this->registerscript, $this->runScript,
$this->name, $this->name,
$e->getMessage() $e->getMessage()
); );
@ -390,11 +390,11 @@ class Module
* *
* @return self * @return self
*/ */
protected function runRegisterScript() protected function launchRunScript()
{ {
if (file_exists($this->registerscript) if (file_exists($this->runScript)
&& is_readable($this->registerscript)) { && is_readable($this->runScript)) {
include($this->registerscript); include($this->runScript);
} }
return $this; return $this;
} }