From 2cd25b7376404b01b6aa0fdd313ba8ebb3c657d7 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 22 Jun 2014 13:52:40 +0200 Subject: [PATCH] ActionController: if/else should be easy to read --- .../Icinga/Web/Controller/ActionController.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index f687ce237..a36e8beb7 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -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)