mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
merged fix for a problem where globallang is not respected in user table
This commit is contained in:
parent
a58ffe3fe2
commit
8ab2baa8f3
1 changed files with 6 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
|
function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
|
||||||
|
|
||||||
global $CFG, $db, $processedrecords;
|
global $CFG, $db, $processedrecords, $globallang;
|
||||||
|
|
||||||
// convert all columns to blobs
|
// convert all columns to blobs
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
@ -74,7 +74,11 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
|
||||||
update_record('config',$migrationconfig);
|
update_record('config',$migrationconfig);
|
||||||
|
|
||||||
// this is the only encoding we need for this table
|
// this is the only encoding we need for this table
|
||||||
$fromenc = get_original_encoding('','',$record->lang);
|
if ($globallang) {
|
||||||
|
$fromenc = $globallang;
|
||||||
|
} else {
|
||||||
|
$fromenc = get_original_encoding('','',$record->lang);
|
||||||
|
}
|
||||||
|
|
||||||
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
|
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue