mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-6196 minor related cleanup - should not be needed to backport it; merged from MOODLE_18_STABLE
This commit is contained in:
parent
684663f526
commit
e50916c80f
@ -3403,7 +3403,11 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// If it has changed, convert all the necessary strings
|
/// If it has changed, convert all the necessary strings
|
||||||
if ($mail->CharSet != $charset) {
|
$charset = strtolower($charset);
|
||||||
|
$charsets = get_list_of_charsets();
|
||||||
|
unset($charsets['UTF-8']);
|
||||||
|
$charsets = array_map('strtolower', $charsets);
|
||||||
|
if (in_array($charset, $charsets)) {
|
||||||
/// Save the new mail charset
|
/// Save the new mail charset
|
||||||
$mail->CharSet = $charset;
|
$mail->CharSet = $charset;
|
||||||
/// And convert some strings
|
/// And convert some strings
|
||||||
@ -4574,7 +4578,7 @@ function get_list_of_charsets() {
|
|||||||
'ISO-8859-1' => 'ISO-8859-1',
|
'ISO-8859-1' => 'ISO-8859-1',
|
||||||
'SHIFT-JIS' => 'SHIFT-JIS',
|
'SHIFT-JIS' => 'SHIFT-JIS',
|
||||||
'GB2312' => 'GB2312',
|
'GB2312' => 'GB2312',
|
||||||
'GB18030' => 'GB18030',
|
'GB18030' => 'GB18030', // gb18030 not supported by typo and mbstring
|
||||||
'UTF-8' => 'UTF-8');
|
'UTF-8' => 'UTF-8');
|
||||||
|
|
||||||
asort($charsets);
|
asort($charsets);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user