Commit 8a7ba0e4 authored by omega8cc's avatar omega8cc Committed by helmo

Add support for Drupal 8 specific extra config in settings.php

Conflicts:
	Provision/Config/Drupal/provision_drupal_settings.tpl.php
	platform/provision_drupal.drush.inc
parent d83f0422
......@@ -15,11 +15,16 @@ class Provision_Config_Drupal_Settings extends Provision_Config {
}
function process() {
if (drush_drupal_major_version() >= 8) {
$this->data['config_directories_active_var'] = 'config_directories_active';
$this->data['config_directories_staging_var'] = 'config_directories_staging';
}
if (drush_drupal_major_version() >= 7) {
$this->data['db_type'] = ($this->data['db_type'] == 'mysqli') ? 'mysql' : $this->data['db_type'];
$this->data['file_directory_path_var'] = 'file_public_path';
$this->data['file_directory_temp_var'] = 'file_temporary_path';
$this->data['file_directory_private_var'] = 'file_private_path';
$this->data['drupal_hash_salt_var'] = 'empty';
}
else {
$this->data['file_directory_path_var'] = 'file_directory_path';
......
......@@ -134,7 +134,16 @@ if (isset($_SERVER['db_name'])) {
$conf['<?php print $file_directory_temp_var ?>'] = 'sites/<?php print $this->uri ?>/private/temp';
<?php if (isset($file_directory_private_var)): ?>
$conf['<?php print $file_directory_private_var ?>'] = 'sites/<?php print $this->uri ?>/private/files';
<?php endif; ?>
<?php endif; ?>
<?php if (isset($drupal_hash_salt_var)): ?>
$drupal_hash_salt = '';
<?php endif; ?>
<?php if (isset($config_directories_active_var)): ?>
$config_directories['active'] = 'sites/<?php print $this->uri ?>/private/config/active';
<?php endif; ?>
<?php if (isset($config_directories_staging_var)): ?>
$config_directories['staging'] = 'sites/<?php print $this->uri ?>/private/config/staging';
<?php endif; ?>
$conf['clean_url'] = 1;
$conf['aegir_api'] = <?php print !$this->backup_in_progress ? $this->api_version : 0 ?>;
......
......@@ -228,6 +228,19 @@ function _provision_drupal_create_directories($url = NULL) {
$mkdir["sites/$url/private/temp"] = 02770;
$chgrp["sites/$url/private/temp"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/styles"] = 02770;
$chgrp["sites/$url/files/styles"] = d('@server_master')->web_group;
// d8 support
$mkdir["sites/$url/private/config"] = 02770;
$chgrp["sites/$url/private/config"] = d('@server_master')->web_group;
$mkdir["sites/$url/private/config/active"] = 02770;
$chgrp["sites/$url/private/config/active"] = d('@server_master')->web_group;
$mkdir["sites/$url/private/config/staging"] = 02770;
$chgrp["sites/$url/private/config/staging"] = d('@server_master')->web_group;
}
// These paths should not have recursive operations performed on them.
......@@ -244,7 +257,11 @@ function _provision_drupal_create_directories($url = NULL) {
"sites/$url/files/locations",
"sites/$url/private",
"sites/$url/private/files",
"sites/$url/private/temp"
"sites/$url/private/temp",
"sites/$url/files/styles",
"sites/$url/private/config",
"sites/$url/private/config/active",
"sites/$url/private/config/staging"
);
// Allow other commands to add or alter the directories to be created.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment