Browse files

The file countries.php does not exist in lang/en, only in lang/en_utf…

…8. Therefore the fallback default in the function get_list_of_countries() should always be en_utf8.
  • Loading branch information...
1 parent 51df210 commit 5b3df41fd9b7b24c45bf6fd63bb753fd5703f5e3 gustav_delius committed Sep 3, 2006
Showing with 2 additions and 8 deletions.
  1. +2 −8 lib/moodlelib.php
View
10 lib/moodlelib.php
@@ -4508,23 +4508,17 @@ 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')) {
if (file_exists($CFG->dirroot .'/lang/'. $parentlang .'/countries.php') ||
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
}
}

0 comments on commit 5b3df41

Please sign in to comment.