Commit 09e6ef4a authored by wmortada's avatar wmortada

Move database configuration later in the install process

parent 40200ad6
......@@ -104,64 +104,6 @@ $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages';
require_once $crmPath . '/CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();
// Load civicrm database config
if (isset($_POST['mysql'])) {
$databaseConfig = $_POST['mysql'];
}
else {
$databaseConfig = array(
"server" => "localhost",
"username" => "civicrm",
"password" => "",
"database" => "civicrm",
);
}
if ($installType == 'wordpress') {
// Load WP database config
if (isset($_POST['mysql'])) {
$databaseConfig = $_POST['mysql'];
}
else {
$databaseConfig = array(
"server" => DB_HOST,
"username" => DB_USER,
"password" => DB_PASSWORD,
"database" => DB_NAME,
);
}
}
if ($installType == 'drupal') {
// Load drupal database config
if (isset($_POST['drupal'])) {
$drupalConfig = $_POST['drupal'];
}
else {
$drupalConfig = array(
"server" => "localhost",
"username" => "drupal",
"password" => "",
"database" => "drupal",
);
}
}
if ($installType == 'backdrop') {
// Load backdrop database config
if (isset($_POST['backdrop'])) {
$backdropConfig = $_POST['backdrop'];
}
else {
$backdropConfig = array(
"server" => "localhost",
"username" => "backdrop",
"password" => "",
"database" => "backdrop",
);
}
}
$loadGenerated = 0;
if (isset($_POST['loadGenerated'])) {
$loadGenerated = 1;
......@@ -368,6 +310,64 @@ elseif ($installType == 'wordpress') {
}
}
// Load civicrm database config
if (isset($_POST['mysql'])) {
$databaseConfig = $_POST['mysql'];
}
else {
$databaseConfig = array(
"server" => "localhost",
"username" => "civicrm",
"password" => "",
"database" => "civicrm",
);
}
if ($installType == 'wordpress') {
// Load WP database config
if (isset($_POST['mysql'])) {
$databaseConfig = $_POST['mysql'];
}
else {
$databaseConfig = array(
"server" => DB_HOST,
"username" => DB_USER,
"password" => DB_PASSWORD,
"database" => DB_NAME,
);
}
}
if ($installType == 'drupal') {
// Load drupal database config
if (isset($_POST['drupal'])) {
$drupalConfig = $_POST['drupal'];
}
else {
$drupalConfig = array(
"server" => "localhost",
"username" => "drupal",
"password" => "",
"database" => "drupal",
);
}
}
if ($installType == 'backdrop') {
// Load backdrop database config
if (isset($_POST['backdrop'])) {
$backdropConfig = $_POST['backdrop'];
}
else {
$backdropConfig = array(
"server" => "localhost",
"username" => "backdrop",
"password" => "",
"database" => "backdrop",
);
}
}
// Check requirements
$req = new InstallRequirements();
$req->check();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment