diff options
author | Frank Karlitschek <frank@owncloud.org> | 2014-06-21 00:56:37 +0400 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2014-06-21 00:56:37 +0400 |
commit | feca3d0ea9266f02f4ab86322ca6feadd9f3457e (patch) | |
tree | 900064ec1a24da6550e411feeab556d76d4df543 | |
parent | 6eb39f21942594298517e0570149e14ff0a24058 (diff) | |
parent | 267c0ff567c23601992d88e049acc09a8658d153 (diff) |
Merge pull request #9075 from owncloud/autosetup-trusteddomains
trusted domains shall not be ignored on autosetup
-rw-r--r-- | lib/private/setup.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php index 8ef563b0be0..ea58db9dbb5 100644 --- a/lib/private/setup.php +++ b/lib/private/setup.php @@ -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())); |