From 4508fdd28278613efcdf5bcafe6c6790a1dd591e Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Sun, 3 Sep 2006 11:39:54 +0000 Subject: [PATCH] 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. --- lib/moodlelib.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 42ef69a999a..41562e92ebe 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5091,12 +5091,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')) { @@ -5104,14 +5098,13 @@ 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 } } - $string = array(); if (file_exists($CFG->dataroot .'/lang/'. $lang .'/countries.php')) { include($CFG->dataroot .'/lang/'. $lang .'/countries.php'); } else if (file_exists($CFG->dirroot .'/lang/'. $lang .'/countries.php')) {