mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-55654 user: apply format_string to field names
This commit is contained in:
parent
0344082208
commit
88c9c42da2
user/profile
@ -437,10 +437,8 @@ function profile_list_datatypes() {
|
||||
*/
|
||||
function profile_list_categories() {
|
||||
global $DB;
|
||||
if (!$categories = $DB->get_records_menu('user_info_category', null, 'sortorder ASC', 'id, name')) {
|
||||
$categories = array();
|
||||
}
|
||||
return $categories;
|
||||
$categories = $DB->get_records_menu('user_info_category', null, 'sortorder ASC', 'id, name');
|
||||
return array_map('format_string', $categories);
|
||||
}
|
||||
|
||||
|
||||
@ -572,7 +570,7 @@ function profile_edit_field($id, $datatype, $redirect) {
|
||||
if (empty($id)) {
|
||||
$strheading = get_string('profilecreatenewfield', 'admin', $datatypes[$datatype]);
|
||||
} else {
|
||||
$strheading = get_string('profileeditfield', 'admin', $field->name);
|
||||
$strheading = get_string('profileeditfield', 'admin', format_string($field->name));
|
||||
}
|
||||
|
||||
// Print the page.
|
||||
|
@ -81,7 +81,7 @@ switch ($action) {
|
||||
// Ask for confirmation, as there is user data available for field.
|
||||
$fieldname = $DB->get_field('user_info_field', 'name', array('id' => $id));
|
||||
$optionsyes = array ('id' => $id, 'confirm' => 1, 'action' => 'deletefield', 'sesskey' => sesskey());
|
||||
$strheading = get_string('profiledeletefield', 'admin', $fieldname);
|
||||
$strheading = get_string('profiledeletefield', 'admin', format_string($fieldname));
|
||||
$PAGE->navbar->add($strheading);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strheading);
|
||||
|
Loading…
x
Reference in New Issue
Block a user