public function setupCms() {
if (!in_array($this->config->cms, array(
- 'drupal', 'joomla', 'wordpress'))) {
+ 'drupal',
+ 'drupal8',
+ 'joomla',
+ 'wordpress',
+ ))) {
echo "Config file for '{$this->config->cms}' not known.";
exit();
}
if ($configTemplate) {
echo "Generating civicrm.config.php\n";
copy($configTemplate, '../civicrm.config.php');
- } else {
+ }
+ else {
throw new Exception("Failed to locate template for civicrm.config.php");
}
}
}
/**
- * @param string $cms "drupal"|"wordpress"
- * @return null|string path to config template
+ * @param string $cms
+ * "drupal"|"wordpress".
+ * @return null|string
+ * path to config template
*/
public function findConfigTemplate($cms) {
$candidates = array();
switch ($cms) {
case 'drupal':
$candidates[] = "../drupal/civicrm.config.php.drupal";
- $candidates[] = "../../drupal/civicrm.config.php.drupal";
+ $candidates[] = "../../drupal/civicrm.config.php.drupal";
+ break;
+
+ case 'drupal8':
+ $candidates[] = "../../modules/civicrm/civicrm.config.php.drupal";
+ $candidates[] = "../../../modules/civicrm/civicrm.config.php.drupal";
break;
+
case 'wordpress':
$candidates[] = "../../civicrm.config.php.wordpress";
$candidates[] = "../WordPress/civicrm.config.php.wordpress";
}
return NULL;
}
+
}