diff options
author | vsapronov <vladimir.sapronov@gmail.com> | 2013-09-24 23:31:47 -0400 |
---|---|---|
committer | vsapronov <vladimir.sapronov@gmail.com> | 2013-09-25 00:13:38 -0400 |
commit | dc382bc9ccb0735ebc63b8bc8d43ff8512ac171a (patch) | |
tree | fd238940b040adc9828e07681607a66c70e0d267 /core/setup.php | |
parent | 2d12e52769a30ba37d5760b1194f613bcc71035b (diff) | |
download | nextcloud-server-dc382bc9ccb0735ebc63b8bc8d43ff8512ac171a.tar.gz nextcloud-server-dc382bc9ccb0735ebc63b8bc8d43ff8512ac171a.zip |
autoconfig.php could have only some of parameters; installation.php generates UI accordingly
Diffstat (limited to 'core/setup.php')
-rw-r--r-- | core/setup.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/core/setup.php b/core/setup.php index 4758c23b045..d18b1d54c2b 100644 --- a/core/setup.php +++ b/core/setup.php @@ -5,9 +5,18 @@ $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); include $autosetup_file; - $_POST['install'] = 'true'; $_POST = array_merge ($_POST, $AUTOCONFIG); - unlink($autosetup_file); +} + +$dbSet = isset($_POST['dbtype']); +$directorySet = isset($_POST['directory']); +$adminAccountSet = isset($_POST['adminlogin']); + +if ($dbSet AND $directorySet AND $adminAccountSet) { + $_POST['install'] = 'true'; + if( file_exists( $autosetup_file )) { + unlink($autosetup_file); + } } OC_Util::addScript('setup'); @@ -21,7 +30,7 @@ $datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data'); $vulnerableToNullByte = false; if(@file_exists(__FILE__."\0Nullbyte")) { // Check if the used PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243) $vulnerableToNullByte = true; -} +} // Protect data directory here, so we can test if the protection is working OC_Setup::protectDataDirectory(); @@ -37,6 +46,8 @@ $opts = array( 'htaccessWorking' => OC_Util::isHtAccessWorking(), 'vulnerableToNullByte' => $vulnerableToNullByte, 'errors' => array(), + 'dbSet' => $dbSet, + 'directorySet' => $directorySet ); if(isset($_POST['install']) AND $_POST['install']=='true') { |