}
}
-// Load civicrm database config
+// 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
}
}
+// By default set CiviCRM database to be same as CMS database
+if (!isset($databaseConfig)) {
+ if (($installType == 'drupal') && (isset($drupalConfig))) {
+ $databaseConfig = $drupalConfig;
+ }
+ if (($installType == 'backdrop') && (isset($backdropConfig))) {
+ $databaseConfig = $backdropConfig;
+ }
+}
+
// Check requirements
$req = new InstallRequirements();
$req->check();