The file countries.php does not exist in lang/en, only in lang/en_utf8. Therefore the fallback default in the function get_list_of_countries() should always be en_utf8.

This commit is contained in:
gustav_delius
2006-09-03 11:38:45 +00:00
parent 51df210337
commit 5b3df41fd9
+2 -8
View File
@@ -4508,12 +4508,6 @@ function get_list_of_countries() {
$lang = current_language();
if (!empty($CFG->unicodedb)) {
$defaultlang = 'en_utf8';
} else {
$defaultlang = 'en';
}
if (!file_exists($CFG->dirroot .'/lang/'. $lang .'/countries.php') &&
!file_exists($CFG->dataroot.'/lang/'. $lang .'/countries.php')) {
if ($parentlang = get_string('parentlanguage')) {
@@ -4521,10 +4515,10 @@ function get_list_of_countries() {
file_exists($CFG->dataroot.'/lang/'. $parentlang .'/countries.php')) {
$lang = $parentlang;
} else {
$lang = $defaultlang; // countries.php must exist in this pack
$lang = 'en_utf8'; // countries.php must exist in this pack
}
} else {
$lang = $defaultlang; // countries.php must exist in this pack
$lang = 'en_utf8'; // countries.php must exist in this pack
}
}