Avoid some notices. Part of MDL-6854

This commit is contained in:
stronk7 2006-10-05 19:29:39 +00:00
parent ec467c6929
commit 10f36d68e8
2 changed files with 14 additions and 6 deletions

View File

@ -24,8 +24,9 @@ function migrate2utf8_backup_ids_info($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
/// We are going to use textlib facilities
/// Initialise $result
$result = $backupids->info;
/// Convert the text
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
$result = utfconvert($backupids->info, $fromenc);

View File

@ -250,7 +250,9 @@ function migrate2utf8_role_name($recordid){
$userlang = null; // Non existing
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
/// We are going to use textlib facilities
/// Initialise $result
$result = $role->name;
/// Convert the text
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
@ -286,7 +288,9 @@ function migrate2utf8_role_description($recordid){
$userlang = null; // Non existing
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
/// We are going to use textlib facilities
/// Initialise $result
$result = $role->description;
/// Convert the text
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
@ -594,7 +598,9 @@ function migrate2utf8_config_value($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
/// We are going to use textlib facilities
/// Initialise $result
$result = $config->value;
/// Convert the text
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
@ -670,7 +676,8 @@ function migrate2utf8_course_categories_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
/// We are going to use textlib facilities
/// Initialise $result
$result = $coursecategories->name;
/// Convert the text
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {