CRM-19729
authorKevin Cristiano <kcristiano@tadpole.cc>
Tue, 13 Sep 2016 15:27:12 +0000 (11:27 -0400)
committerKevin Cristiano <kcristiano@tadpole.cc>
Tue, 13 Sep 2016 15:27:12 +0000 (11:27 -0400)
Fix CiviCRM databaseConfig for WordPress.  Default to existing WP database, but allow override.  Thsi will ensure re-check requirements does not overwrite the settings

install/index.php

index 276c1c4ca1304f467b660fe0c1e14e4bc31ea30c..ad024a88a828f876791b350674975750d4aaafe0 100644 (file)
@@ -118,13 +118,18 @@ else {
 }
 
 if ($installType == 'wordpress') {
-  //WP Database Data
+  // 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') {