From: stronk7 Date: Fri, 9 Nov 2007 20:11:43 +0000 (+0000) Subject: New profilefield_ lang files are now supported with X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b77bbd2f83232ac78197541706869250844dbcc5;p=moodle.git New profilefield_ lang files are now supported with safe fallback to the "old" ones (stored in admin.php) Merged from MOODLE_19_STABLE --- diff --git a/user/profile/definelib.php b/user/profile/definelib.php index 543da4937d..68e6530449 100644 --- a/user/profile/definelib.php +++ b/user/profile/definelib.php @@ -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; }