[icinga-checkins] icinga.org: icingaweb2/master: Do not redirect to the wizard in case of an empty config.ini

git at icinga.org git at icinga.org
Tue Nov 18 13:53:39 CET 2014


Module: icingaweb2
Branch: master
Commit: be6358452e9d91912ef09ab19bab9833a055ec43
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=be6358452e9d91912ef09ab19bab9833a055ec43

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Tue Nov 18 13:13:02 2014 +0100

Do not redirect to the wizard in case of an empty config.ini

---

 application/controllers/AuthenticationController.php |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php
index b0d93dd..00dae1c 100644
--- a/application/controllers/AuthenticationController.php
+++ b/application/controllers/AuthenticationController.php
@@ -33,15 +33,8 @@ class AuthenticationController extends ActionController
      */
     public function loginAction()
     {
-        if (@file_exists(Config::$configDir . '/setup.token')) {
-            try {
-                $config = Config::app()->toArray();
-                if (empty($config)) {
-                    $this->redirectNow(Url::fromPath('setup'));
-                }
-            } catch (NotReadableError $e) {
-                // Gets thrown in case of insufficient permission only
-            }
+        if (@file_exists(Config::resolvePath('setup.token')) && !@file_exists(Config::resolvePath('config.ini'))) {
+            $this->redirectNow(Url::fromPath('setup'));
         }
 
         $auth = $this->Auth();



More information about the icinga-checkins mailing list