From b77bbd2f83232ac78197541706869250844dbcc5 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 9 Nov 2007 20:11:43 +0000 Subject: [PATCH] New profilefield_ lang files are now supported with safe fallback to the "old" ones (stored in admin.php) Merged from MOODLE_19_STABLE --- user/profile/definelib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.5