Commit d559694e authored by helmo's avatar helmo

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

parent 265f826c
...@@ -24,7 +24,7 @@ class Provision_Config_Drupal_Settings extends Provision_Config { ...@@ -24,7 +24,7 @@ class Provision_Config_Drupal_Settings extends Provision_Config {
// Multi-byte UTF-8 support in Drupal 7 // Multi-byte UTF-8 support in Drupal 7
// https://www.drupal.org/node/2754539 // https://www.drupal.org/node/2754539
if (version_compare(drush_drupal_version(), '7.50', '>=')) { if (version_compare(drush_drupal_version(), '7.50', '>=') && drush_get_option('utf8mb4IsSupported', FALSE)) {
$this->data['utf8mb4IsSupported'] = TRUE; $this->data['utf8mb4IsSupported'] = TRUE;
} }
......
...@@ -51,6 +51,8 @@ if (isset($_SERVER['db_name'])) { ...@@ -51,6 +51,8 @@ if (isset($_SERVER['db_name'])) {
<?php if ($utf8mb4IsSupported): ?> <?php if ($utf8mb4IsSupported): ?>
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_general_ci', 'collation' => 'utf8mb4_general_ci',
<?php else: ?>
// ... not adding charset utf8mb4, add "$options['utf8mb4IsSupported'] = TRUE;" to /etc/drush/drushrc.php to enable.
<?php endif; ?> <?php endif; ?>
); );
$db_url['default'] = $_SERVER['db_type'] . '://' . $_SERVER['db_user'] . ':' . $_SERVER['db_passwd'] . '@' . $_SERVER['db_host'] . ':' . $_SERVER['db_port'] . '/' . $_SERVER['db_name']; $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