Skip to content

Commit

Permalink
Quickfix to get master-1 running
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf committed Mar 4, 2014
1 parent 07d0462 commit 3ac276e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions library/Icinga/Application/Modules/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private function detectEnabledModules()

$link = $this->enableDir . '/' . $file;
if (! is_link($link)) {
Logger::warn(
Logger::warning(
'Found invalid module in enabledModule directory "%s": "%s" is not a symlink',
$this->enableDir,
$link
Expand All @@ -163,7 +163,7 @@ private function detectEnabledModules()

$dir = realpath($link);
if (!file_exists($dir) || !is_dir($dir)) {
Logger::warn(
Logger::warning(
'Found invalid module in enabledModule directory "%s": "%s" points to non existing path "%s"',
$this->enableDir,
$link,
Expand Down Expand Up @@ -268,7 +268,6 @@ public function enableModule($name)
$this->enabledDirs[$name] = $link;

$this->loadModule($name);
$this->getModule($name)->launchRegisterScript();

return $this;
}
Expand Down Expand Up @@ -513,15 +512,15 @@ public function detectInstalledModules()
foreach ($this->modulePaths as $basedir) {
$canonical = realpath($basedir);
if ($canonical === false) {
Logger::warn('Module path "%s" does not exist', $basedir);
Logger::warning('Module path "%s" does not exist', $basedir);
continue;
}
if (!is_dir($canonical)) {
Logger::err('Module path "%s" is not a directory', $canonical);
Logger::error('Module path "%s" is not a directory', $canonical);
continue;
}
if (!is_readable($canonical)) {
Logger::err('Module path "%s" is not readable', $canonical);
Logger::error('Module path "%s" is not readable', $canonical);
continue;
}
if (($dh = opendir($canonical)) !== false) {
Expand All @@ -533,7 +532,7 @@ public function detectInstalledModules()
if (! array_key_exists($file, $this->installedBaseDirs)) {
$this->installedBaseDirs[$file] = $canonical . '/' . $file;
} else {
Logger::warn(
Logger::warning(
'Module "%s" already exists in installation path "%s" and is ignored.',
$canonical . '/' . $file,
$this->installedBaseDirs[$file]
Expand Down

0 comments on commit 3ac276e

Please sign in to comment.