mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
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'.
This commit is contained in:
parent
b412069977
commit
b9b10b900d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user