Commit 265f826c authored by Thomas Bosviel's avatar Thomas Bosviel Committed by helmo

Issue #2764111 by helmo, Thomas Bosviel: Support for utf8mb4

parent 89b462ec
......@@ -21,6 +21,13 @@ class Provision_Config_Drupal_Settings extends Provision_Config {
$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';
// Multi-byte UTF-8 support in Drupal 7
// https://www.drupal.org/node/2754539
if (version_compare(drush_drupal_version(), '7.50', '>=')) {
$this->data['utf8mb4IsSupported'] = TRUE;
}
}
else {
$this->data['file_directory_path_var'] = 'file_directory_path';
......
......@@ -48,6 +48,10 @@ if (isset($_SERVER['db_name'])) {
* should probably be fixed in Drush.
*/
'port' => (string) $_SERVER['db_port'],
<?php if ($utf8mb4IsSupported): ?>
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_general_ci',
<?php endif; ?>
);
$db_url['default'] = $_SERVER['db_type'] . '://' . $_SERVER['db_user'] . ':' . $_SERVER['db_passwd'] . '@' . $_SERVER['db_host'] . ':' . $_SERVER['db_port'] . '/' . $_SERVER['db_name'];
}
......
......@@ -48,6 +48,7 @@ if (isset($_SERVER['db_name'])) {
* should probably be fixed in Drush.
*/
'port' => (string) $_SERVER['db_port'],
'collation' => 'utf8mb4_general_ci',
);
$db_url['default'] = $_SERVER['db_type'] . '://' . $_SERVER['db_user'] . ':' . $_SERVER['db_passwd'] . '@' . $_SERVER['db_host'] . ':' . $_SERVER['db_port'] . '/' . $_SERVER['db_name'];
}
......
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