From b9b10b900d1b97ee49c76f1488aa96df7fdcc995 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Wed, 23 Oct 2019 14:08:13 +0800 Subject: [PATCH] MDL-65896 admin: Fix checking for full unicode support Instead of checking whether the charset is set to 'utf8' when determining full unicode support, it should be checking whether the charset is set to 'utf8mb4'. --- admin/settings/subsystems.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/admin/settings/subsystems.php b/admin/settings/subsystems.php index e31b0438fac..01de61c3e36 100644 --- a/admin/settings/subsystems.php +++ b/admin/settings/subsystems.php @@ -52,16 +52,12 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $optionalsubsystems->add(new admin_setting_configcheckbox('enableanalytics', new lang_string('enableanalytics', 'admin'), new lang_string('configenableanalytics', 'admin'), 1, 1, 0)); - $fullunicodesupport = true; if ($DB->get_dbfamily() == 'mysql') { $collation = $DB->get_dbcollation(); $collationinfo = explode('_', $collation); $charset = reset($collationinfo); - - if ($charset !== 'utf8') { - $fullunicodesupport = false; - } + $fullunicodesupport = $charset === 'utf8mb4'; } if ($fullunicodesupport) {