]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixing autoconfig handling
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 5 Feb 2014 17:23:40 +0000 (18:23 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 5 Feb 2014 17:23:40 +0000 (18:23 +0100)
core/setup/controller.php

index c628bda609b6e10108fed4cd9431feeba3e74910..58ed4d28dc0a33b3e091a9b8b417ae897112e95b 100644 (file)
@@ -56,17 +56,18 @@ class Controller {
        }
 
        public function loadAutoConfig($post) {
-               $dbIsSet = isset($post['dbtype']);
-               $directoryIsSet = isset($post['directory']);
-               $adminAccountIsSet = isset($post['adminlogin']);
-
                $autosetup_file = \OC::$SERVERROOT.'/config/autoconfig.php';
                if( file_exists( $autosetup_file )) {
                        \OC_Log::write('core', 'Autoconfig file found, setting up owncloud...', \OC_Log::INFO);
+                       $AUTOCONFIG = array();
                        include $autosetup_file;
                        $post = array_merge ($post, $AUTOCONFIG);
                }
 
+               $dbIsSet = isset($post['dbtype']);
+               $directoryIsSet = isset($post['directory']);
+               $adminAccountIsSet = isset($post['adminlogin']);
+
                if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
                        $post['install'] = 'true';
                        if( file_exists( $autosetup_file )) {