From dc382bc9ccb0735ebc63b8bc8d43ff8512ac171a Mon Sep 17 00:00:00 2001
From: vsapronov
Date: Tue, 24 Sep 2013 23:31:47 -0400
Subject: autoconfig.php could have only some of parameters; installation.php
generates UI accordingly
---
core/setup.php | 17 ++++++++++++++---
core/templates/installation.php | 4 ++++
2 files changed, 18 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') {
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 8b087706801..ed8057452bd 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -61,6 +61,7 @@
+
+
+
+
--
cgit v1.2.3
From 1efbf7774fe4eceeef2e40bf212c89c3ee76052c Mon Sep 17 00:00:00 2001
From: vsapronov
Date: Sun, 29 Sep 2013 20:16:32 -0400
Subject: Fixed review issues
---
core/setup.php | 20 ++++++++++----------
core/templates/installation.php | 8 ++++----
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/core/setup.php b/core/setup.php
index d18b1d54c2b..4026a748453 100644
--- a/core/setup.php
+++ b/core/setup.php
@@ -8,15 +8,15 @@ if( file_exists( $autosetup_file )) {
$_POST = array_merge ($_POST, $AUTOCONFIG);
}
-$dbSet = isset($_POST['dbtype']);
-$directorySet = isset($_POST['directory']);
-$adminAccountSet = isset($_POST['adminlogin']);
+$dbIsSet = isset($_POST['dbtype']);
+$directoryIsSet = isset($_POST['directory']);
+$adminAccountIsSet = isset($_POST['adminlogin']);
-if ($dbSet AND $directorySet AND $adminAccountSet) {
- $_POST['install'] = 'true';
- if( file_exists( $autosetup_file )) {
- unlink($autosetup_file);
- }
+if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
+ $_POST['install'] = 'true';
+ if( file_exists( $autosetup_file )) {
+ unlink($autosetup_file);
+ }
}
OC_Util::addScript('setup');
@@ -46,8 +46,8 @@ $opts = array(
'htaccessWorking' => OC_Util::isHtAccessWorking(),
'vulnerableToNullByte' => $vulnerableToNullByte,
'errors' => array(),
- 'dbSet' => $dbSet,
- 'directorySet' => $directorySet
+ 'dbIsSet' => $dbIsSet,
+ 'directoryIsSet' => $directoryIsSet,
);
if(isset($_POST['install']) AND $_POST['install']=='true') {
diff --git a/core/templates/installation.php b/core/templates/installation.php
index ed8057452bd..342383fdb28 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -61,7 +61,7 @@
-
+
-
+
-
+
-
+
--
cgit v1.2.3
From 46ca1eb91b3b653b52af408ac0d0047d02f0f798 Mon Sep 17 00:00:00 2001
From: vsapronov
Date: Fri, 4 Oct 2013 20:46:00 -0400
Subject: Moving Advanced button out of datadirField fieldset
---
core/templates/installation.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 342383fdb28..ef20d8672e9 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -61,9 +61,14 @@
+
+
+
+