Update to Drupal 8.1.8. For more information, see https://www.drupal.org/project/drupal/releases/8.1.8
This commit is contained in:
parent
e9f047ccf8
commit
f9f23cdf38
312 changed files with 6751 additions and 1546 deletions
|
|
@ -486,16 +486,12 @@ function drupal_install_config_directories() {
|
|||
|
||||
// Add a randomized config directory name to settings.php, unless it was
|
||||
// manually defined in the existing already.
|
||||
$settings = [];
|
||||
$config_directories_hash = Crypt::randomBytesBase64(55);
|
||||
if (empty($config_directories[CONFIG_SYNC_DIRECTORY])) {
|
||||
$config_directories[CONFIG_SYNC_DIRECTORY] = \Drupal::service('site.path') . '/files/config_' . Crypt::randomBytesBase64(55) . '/sync';
|
||||
$settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) [
|
||||
'value' => \Drupal::service('site.path') . '/files/config_' . $config_directories_hash . '/sync',
|
||||
'value' => $config_directories[CONFIG_SYNC_DIRECTORY],
|
||||
'required' => TRUE,
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($settings)) {
|
||||
// Rewrite settings.php, which also sets the value as global variable.
|
||||
drupal_rewrite_settings($settings);
|
||||
}
|
||||
|
|
@ -506,19 +502,21 @@ function drupal_install_config_directories() {
|
|||
// public files directory, which has already been verified to be writable
|
||||
// itself. But if it somehow fails anyway, the installation cannot proceed.
|
||||
// Bail out using a similar error message as in system_requirements().
|
||||
if (!install_ensure_config_directory(CONFIG_SYNC_DIRECTORY)) {
|
||||
if (!file_prepare_directory($config_directories[CONFIG_SYNC_DIRECTORY], FILE_CREATE_DIRECTORY)
|
||||
&& !file_exists($config_directories[CONFIG_SYNC_DIRECTORY])) {
|
||||
throw new Exception(t('The directory %directory could not be created or could not be made writable. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see the <a href=":handbook_url">online handbook</a>.', array(
|
||||
'%directory' => config_get_config_directory(CONFIG_SYNC_DIRECTORY),
|
||||
':handbook_url' => 'https://www.drupal.org/server-permissions',
|
||||
)));
|
||||
}
|
||||
|
||||
// Put a README.txt into the sync config directory. This is required so that
|
||||
// they can later be added to git. Since this directory is auto-created, we
|
||||
// have to write out the README rather than just adding it to the drupal core
|
||||
// repo.
|
||||
$text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.' . ' For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config';
|
||||
file_put_contents(config_get_config_directory(CONFIG_SYNC_DIRECTORY) . '/README.txt', $text);
|
||||
elseif (is_writable($config_directories[CONFIG_SYNC_DIRECTORY])) {
|
||||
// Put a README.txt into the sync config directory. This is required so that
|
||||
// they can later be added to git. Since this directory is auto-created, we
|
||||
// have to write out the README rather than just adding it to the drupal core
|
||||
// repo.
|
||||
$text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.' . ' For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config';
|
||||
file_put_contents(config_get_config_directory(CONFIG_SYNC_DIRECTORY) . '/README.txt', $text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -529,6 +527,9 @@ function drupal_install_config_directories() {
|
|||
*
|
||||
* @return bool
|
||||
* TRUE if the config directory exists and is writable.
|
||||
*
|
||||
* @deprecated in Drupal 8.1.x, will be removed before Drupal 9.0.x. Use
|
||||
* config_get_config_directory() and file_prepare_directory() instead.
|
||||
*/
|
||||
function install_ensure_config_directory($type) {
|
||||
// The config directory must be defined in settings.php.
|
||||
|
|
|
|||
Reference in a new issue