New profilefield_ lang files are now supported with

safe fallback to the "old" ones (stored in admin.php)

Merged from MOODLE_19_STABLE
This commit is contained in:
stronk7 2007-11-09 20:11:43 +00:00
parent 23610d6ff7
commit b77bbd2f83

View File

@ -372,9 +372,14 @@ function profile_list_datatypes() {
if ($dirlist = get_directory_list($CFG->dirroot.'/user/profile/field', '', false, true, false)) {
foreach ($dirlist as $type) {
$datatypes[$type] = get_string('profilefieldtype'.$type, 'admin');
$datatypes[$type] = get_string('profilefieldtype'.$type, 'profilefield_'.$type);
if (strpos($datatypes[$type], '[[') !== false) {
$datatypes[$type] = get_string('profilefieldtype'.$type, 'admin');
}
}
}
asort($datatypes);
return $datatypes;
}