ActionController: if/else should be easy to read

This commit is contained in:
Thomas Gelf 2014-06-22 13:52:40 +02:00
parent b7fc0b67a8
commit 2cd25b7376
1 changed files with 9 additions and 9 deletions

View File

@ -112,17 +112,17 @@ class ActionController extends Zend_Controller_Action
$this->handlerBrowserWindows();
$this->view->translationDomain = 'icinga';
if ($this->requiresConfig() === false) {
if ($this->requiresLogin() === false) {
$this->view->tabs = new Tabs();
$this->moduleInit();
$this->init();
} else {
$this->redirectToLogin(Url::fromRequest());
}
} else {
if ($this->requiresConfig()) {
$this->redirectNow(Url::fromPath('install'));
}
if ($this->requiresLogin()) {
$this->redirectToLogin(Url::fromRequest());
}
$this->view->tabs = new Tabs();
$this->moduleInit();
$this->init();
}
public function Config($file = null)