add patch for drupal 8 install
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 22 Jul 2015 05:03:51 +0000 (17:03 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 22 Jul 2015 05:03:51 +0000 (17:03 +1200)
This should not affect other drupal versions as they will have VERSION defined - reading the code shows that is implicit in existing assumptions

install/civicrm.php

index 8438e850fa27c9899139fb3332b9f35e68985029..30b696a82691d4fc4ca38051df670f98d1ccc005 100644 (file)
@@ -208,7 +208,7 @@ function civicrm_config(&$config) {
   );
 
   $params['baseURL'] = isset($config['base_url']) ? $config['base_url'] : civicrm_cms_base();
-  if ($installType == 'drupal') {
+  if ($installType == 'drupal' && defined('VERSION')) {
     if (version_compare(VERSION, '7.0-rc1') >= 0) {
       $params['cms'] = 'Drupal';
       $params['CMSdbUser'] = addslashes($config['drupal']['username']);
@@ -224,6 +224,13 @@ function civicrm_config(&$config) {
       $params['CMSdbName'] = addslashes($config['drupal']['database']);
     }
   }
+  else if ($installType == 'drupal') {
+    $params['cms'] = $config['cms'];
+    $params['CMSdbUser'] = addslashes($config['cmsdb']['username']);
+    $params['CMSdbPass'] = addslashes($config['cmsdb']['password']);
+    $params['CMSdbHost'] = $config['cmsdb']['server'];
+    $params['CMSdbName'] = addslashes($config['cmsdb']['database']);
+  }
   else {
     $params['cms'] = 'WordPress';
     $params['CMSdbUser'] = addslashes(DB_USER);