Permalink
Browse files

fixing a bug where global lang is not respected in user table

  • Loading branch information...
toyomoyo
toyomoyo committed Jul 5, 2006
1 parent cb43ec5 commit e1ddd943fbff5777ae5d1768320b975b5f402dc2
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/db/migrate2utf8.php
View
@@ -3,7 +3,7 @@
function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
- global $CFG, $db, $processedrecords;
+ global $CFG, $db, $processedrecords, $globallang;
// convert all columns to blobs
foreach ($fields as $field) {
@@ -74,7 +74,11 @@ function migrate2utf8_user($fields, $crash, $debug, $maxrecords) {
update_record('config',$migrationconfig);
// 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')) {
foreach ($fields as $field) {

0 comments on commit e1ddd94

Please sign in to comment.