Forgot to check this in ... has a new function

This commit is contained in:
moodler 2003-11-07 15:11:34 +00:00
parent fbfc267591
commit 82196932b0

View File

@ -1370,13 +1370,36 @@ function get_list_of_countries() {
}
}
include("$CFG->dirroot/lang/$lang/countries.php");
include_once("$CFG->dirroot/lang/$lang/countries.php");
asort($string);
return $string;
}
function get_list_of_pixnames() {
/// Returns a list of picture names in the current language
global $CFG;
$lang = current_language();
if (!file_exists("$CFG->dirroot/lang/$lang/pix.php")) {
if ($parentlang = get_string("parentlanguage")) {
if (file_exists("$CFG->dirroot/lang/$parentlang/pix.php")) {
$lang = $parentlang;
} else {
$lang = "en"; // countries.php must exist in this pack
}
} else {
$lang = "en"; // countries.php must exist in this pack
}
}
include_once("$CFG->dirroot/lang/$lang/pix.php");
return $string;
}
function document_file($file, $include=true) {
/// Can include a given document file (depends on second
/// parameter) or just return info about it