Skip to content

Commit

Permalink
MDL-51427 user: correctly use strings for phone1 and phone2
Browse files Browse the repository at this point in the history
Thanks to Olumuyiwa Taiwo for original patch
  • Loading branch information
marinaglancy committed Sep 16, 2015
1 parent b7d2ed3 commit e6ad581
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions admin/auth_config.php
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion blocks/myprofile/block_myprofile.php
Expand Up @@ -133,7 +133,7 @@ public function get_content() {

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>';
}

Expand Down
4 changes: 2 additions & 2 deletions blocks/myprofile/lang/en/block_myprofile.php
Expand Up @@ -34,8 +34,8 @@
$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';
Expand Down
4 changes: 2 additions & 2 deletions mod/url/locallib.php
Expand Up @@ -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'),
Expand Down

0 comments on commit e6ad581

Please sign in to comment.