Forward index to welcome

refs #4301
This commit is contained in:
Eric Lippmann 2013-06-27 10:15:19 +02:00
parent 1e9fa28433
commit 658fbd0584
1 changed files with 3 additions and 9 deletions

View File

@ -25,14 +25,8 @@ class IndexController extends ActionController
public function preDispatch()
{
parent::preDispatch(); // -> auth :(
$enabled = Icinga::app()->moduleManager()->listEnabledModules();
$default = array('docs', 'certificates');
if (count(array_diff($enabled, $default)) === 0) {
if ($this->action_name !== 'welcome') {
$this->_forward('welcome');
}
} else {
$this->_forward('index', 'dashboard');
if ($this->action_name !== 'welcome') {
$this->_forward('welcome');
}
}
@ -44,4 +38,4 @@ class IndexController extends ActionController
}
}
// @codingStandardsIgnoreEnd
// @codingStandardsIgnoreEnd