]> source.dussan.org Git - nextcloud-server.git/commitdiff
trusted domains shall not be ignored on autosetup
authorArthur Schiwon <blizzz@owncloud.com>
Tue, 17 Jun 2014 20:58:08 +0000 (22:58 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 23 Jun 2014 08:33:15 +0000 (10:33 +0200)
lib/private/setup.php

index 7a08816c4b1f5e384875ea7dfe00f686f9e78b84..fdf98ab0959209e88dffdfe8d99028290e547481 100644 (file)
@@ -50,6 +50,12 @@ class OC_Setup {
                $username = htmlspecialchars_decode($options['adminlogin']);
                $password = htmlspecialchars_decode($options['adminpass']);
                $datadir = htmlspecialchars_decode($options['directory']);
+               if(    isset($options['trusted_domains'])
+                   && is_array($options['trusted_domains'])) {
+                       $trustedDomains = $options['trusted_domains'];
+               } else {
+                       $trustedDomains = array(OC_Request::serverHost());
+               }
 
                if (OC_Util::runningOnWindows()) {
                        $datadir = rtrim(realpath($datadir), '\\');
@@ -65,7 +71,7 @@ class OC_Setup {
                OC_Config::setValue('passwordsalt', $salt);
 
                //write the config file
-               OC_Config::setValue('trusted_domains', array(OC_Request::serverHost())); 
+               OC_Config::setValue('trusted_domains', $trustedDomains);
                OC_Config::setValue('datadirectory', $datadir);
                OC_Config::setValue('dbtype', $dbtype);
                OC_Config::setValue('version', implode('.', OC_Util::getVersion()));