From 9178521b16223f2913975e8198d76c8a345f6874 Mon Sep 17 00:00:00 2001 From: William Mortada Date: Thu, 12 Oct 2017 00:55:51 +0100 Subject: [PATCH] By default set CiviCRM database to be same as CMS database --- install/index.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/install/index.php b/install/index.php index f23c6b4a60..ebc282eea6 100644 --- a/install/index.php +++ b/install/index.php @@ -313,18 +313,10 @@ elseif ($installType == 'wordpress') { } } -// 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 @@ -371,6 +363,16 @@ if ($installType == 'backdrop') { } } +// 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(); -- 2.25.1