MDL-51427 user: correctly use strings for phone1 and phone2
Thanks to Olumuyiwa Taiwo for original patch
This commit is contained in:
@@ -146,8 +146,8 @@ function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts,
|
||||
// If custom field then pick name from database.
|
||||
$fieldshortname = str_replace('profile_field_', '', $fieldname);
|
||||
$fieldname = $customfieldname[$fieldshortname]->name;
|
||||
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
|
||||
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
|
||||
} elseif ($fieldname == 'phone1') {
|
||||
$fieldname = get_string('phone');
|
||||
} elseif ($fieldname == 'url') {
|
||||
$fieldname = get_string('webpage');
|
||||
} else {
|
||||
|
||||
@@ -133,7 +133,7 @@ class block_myprofile extends block_base {
|
||||
|
||||
if(!empty($this->config->display_phone2) && !empty($USER->phone2)) {
|
||||
$this->content->text .= '<div class="myprofileitem phone2">';
|
||||
$this->content->text .= get_string('phone').': ' . s($USER->phone2);
|
||||
$this->content->text .= get_string('phone2').': ' . s($USER->phone2);
|
||||
$this->content->text .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ $string['display_skype'] = 'Display Skype';
|
||||
$string['display_yahoo'] = 'Display Yahoo';
|
||||
$string['display_aim'] = 'Display AIM';
|
||||
$string['display_msn'] = 'Display MSN';
|
||||
$string['display_phone1'] = 'Display phone number 1';
|
||||
$string['display_phone2'] = 'Display phone number 2';
|
||||
$string['display_phone1'] = 'Display phone';
|
||||
$string['display_phone2'] = 'Display mobile phone';
|
||||
$string['display_institution'] = 'Display institution';
|
||||
$string['display_address'] = 'Display address';
|
||||
$string['display_firstaccess'] = 'Display first access';
|
||||
|
||||
@@ -421,8 +421,8 @@ function url_get_variable_options($config) {
|
||||
'userfullname' => get_string('fullnameuser'),
|
||||
'useremail' => get_string('email'),
|
||||
'usericq' => get_string('icqnumber'),
|
||||
'userphone1' => get_string('phone').' 1',
|
||||
'userphone2' => get_string('phone2').' 2',
|
||||
'userphone1' => get_string('phone'),
|
||||
'userphone2' => get_string('phone2'),
|
||||
'userinstitution' => get_string('institution'),
|
||||
'userdepartment' => get_string('department'),
|
||||
'useraddress' => get_string('address'),
|
||||
|
||||
Reference in New Issue
Block a user