File manager - Edit - /home/wwwroot/camplus.hk/elearning.acehub.hk/public_html/remove_rubbish_userfield.patch
Back
commit 336172fa965e781eeae5f61e53a943de34912f13 Author: Adam Tong <adam@prd.camplus.hk> Date: Fri Dec 19 09:51:24 2014 +0800 remove rubbish user fileds diff --git a/admin/settings/users.php b/admin/settings/users.php index f8d5b74..443aa7a 100755 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -157,12 +157,6 @@ if ($hassiteconfig array('description' => new lang_string('description'), 'city' => new lang_string('city'), 'country' => new lang_string('country'), - 'webpage' => new lang_string('webpage'), - 'icqnumber' => new lang_string('icqnumber'), - 'skypeid' => new lang_string('skypeid'), - 'yahooid' => new lang_string('yahooid'), - 'aimid' => new lang_string('aimid'), - 'msnid' => new lang_string('msnid'), 'firstaccess' => new lang_string('firstaccess'), 'lastaccess' => new lang_string('lastaccess'), 'lastip' => new lang_string('lastip'), diff --git a/admin/tool/uploaduser/user_form.php b/admin/tool/uploaduser/user_form.php index 1ec16e0..9ef4128 100755 --- a/admin/tool/uploaduser/user_form.php +++ b/admin/tool/uploaduser/user_form.php @@ -271,10 +271,6 @@ class admin_uploaduser_form2 extends moodleform { $mform->addHelpButton('description', 'userdescription'); $mform->setAdvanced('description'); - $mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"'); - $mform->setType('url', PARAM_URL); - $mform->setAdvanced('url'); - $mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"'); $mform->setType('idnumber', PARAM_NOTAGS); diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 1974d59..88bd472 100755 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -118,7 +118,6 @@ $string['advancedsettings'] = 'Advanced settings'; $string['afterresource'] = 'After resource "{$a}"'; $string['aftersection'] = 'After section "{$a}"'; $string['again'] = 'again'; -$string['aimid'] = 'AIM ID'; $string['ajaxuse'] = 'AJAX and Javascript'; $string['all'] = 'All'; $string['allactions'] = 'All actions'; @@ -955,7 +954,6 @@ $string['choosereportfilter'] = 'Choose a filter for the report'; $string['choosetheme'] = 'Choose theme'; $string['chooseuser'] = 'Choose a user'; $string['eventcontentviewed'] = 'Content viewed'; -$string['icqnumber'] = 'ICQ number'; $string['icon'] = 'Icon'; $string['idnumber'] = 'ID number'; $string['idnumbercourse'] = 'Course ID number'; @@ -1202,7 +1200,6 @@ $string['moveselectedcategoriesto'] = 'Move selected categories to'; $string['moveselectedcoursesto'] = 'Move selected courses to...'; $string['movetoanotherfolder'] = 'Move to another folder'; $string['moveup'] = 'Move up'; -$string['msnid'] = 'MSN ID'; $string['mustconfirm'] = 'You need to confirm your login'; $string['mustchangepassword'] = 'The new password must be different than the current one'; $string['mycourses'] = 'My courses'; @@ -1716,7 +1713,6 @@ $string['skipped'] = 'Skipped'; $string['skiptocategorylisting'] = 'Skip to the category listings'; $string['skiptocourselisting'] = 'Skip to the course listings'; $string['skiptocoursedetails'] = 'Skip to the detailed course information'; -$string['skypeid'] = 'Skype ID'; $string['socialheadline'] = 'Social forum - latest topics'; $string['someallowguest'] = 'Some courses may allow guest access'; $string['someerrorswerefound'] = 'Some information was missing or incorrect. Look below for details.'; @@ -1962,7 +1958,6 @@ $string['visible_help'] = 'This setting determines whether the course appears in $string['visibletostudents'] = 'Visible to {$a}'; $string['warning'] = 'Warning'; $string['warningdeleteresource'] = 'Warning: {$a} is referred in a resource. Would you like to update the resource?'; -$string['webpage'] = 'Web page'; $string['week'] = 'Week'; $string['weeks'] = 'weeks'; $string['weekhide'] = 'Hide this week from {$a}'; @@ -2011,7 +2006,6 @@ $string['writingmoduleinfo'] = 'Writing modules info'; $string['writingscalesinfo'] = 'Writing scales info'; $string['writinguserinfo'] = 'Writing users info'; $string['wrongpassword'] = 'Incorrect password for this username'; -$string['yahooid'] = 'Yahoo ID'; $string['year'] = 'year'; $string['years'] = 'years'; $string['yes'] = 'Yes'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0df92ca..159da93 100755 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -3862,24 +3862,6 @@ function get_user_field_name($field) { case 'phone1' : { return get_string('phone'); } - case 'url' : { - return get_string('webpage'); - } - case 'icq' : { - return get_string('icqnumber'); - } - case 'skype' : { - return get_string('skypeid'); - } - case 'aim' : { - return get_string('aimid'); - } - case 'yahoo' : { - return get_string('yahooid'); - } - case 'msn' : { - return get_string('msnid'); - } } // Otherwise just use the same lang string. return get_string($field); diff --git a/mod/url/locallib.php b/mod/url/locallib.php index b882287..2ceb9c5 100755 --- a/mod/url/locallib.php +++ b/mod/url/locallib.php @@ -420,7 +420,6 @@ function url_get_variable_options($config) { 'userlastname' => get_string('lastname'), 'userfullname' => get_string('fullnameuser'), 'useremail' => get_string('email'), - 'usericq' => get_string('icqnumber'), 'userphone1' => get_string('phone').' 1', 'userphone2' => get_string('phone2').' 2', 'userinstitution' => get_string('institution'), @@ -428,7 +427,6 @@ function url_get_variable_options($config) { 'useraddress' => get_string('address'), 'usercity' => get_string('city'), 'usertimezone' => get_string('timezone'), - 'userurl' => get_string('webpage'), ); if ($config->rolesinparams) { diff --git a/user/editlib.php b/user/editlib.php index 62c114c..987d911 100755 --- a/user/editlib.php +++ b/user/editlib.php @@ -306,24 +306,6 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager // Moodle optional fields. $mform->addElement('header', 'moodle_optional', get_string('optional', 'form')); - $mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"'); - $mform->setType('url', PARAM_URL); - - $mform->addElement('text', 'icq', get_string('icqnumber'), 'maxlength="15" size="25"'); - $mform->setType('icq', PARAM_NOTAGS); - - $mform->addElement('text', 'skype', get_string('skypeid'), 'maxlength="50" size="25"'); - $mform->setType('skype', PARAM_NOTAGS); - - $mform->addElement('text', 'aim', get_string('aimid'), 'maxlength="50" size="25"'); - $mform->setType('aim', PARAM_NOTAGS); - - $mform->addElement('text', 'yahoo', get_string('yahooid'), 'maxlength="50" size="25"'); - $mform->setType('yahoo', PARAM_NOTAGS); - - $mform->addElement('text', 'msn', get_string('msnid'), 'maxlength="50" size="25"'); - $mform->setType('msn', PARAM_NOTAGS); - $mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"'); $mform->setType('idnumber', PARAM_NOTAGS); diff --git a/user/lib.php b/user/lib.php index 5fac196..be9c038 100755 --- a/user/lib.php +++ b/user/lib.php @@ -393,32 +393,6 @@ function user_get_user_details($user, $course = null, array $userfields = array( $userdetails['city'] = $user->city; } - if (in_array('url', $userfields) && $user->url && (!isset($hiddenfields['webpage']) or $isadmin)) { - $url = $user->url; - if (strpos($user->url, '://') === false) { - $url = 'http://'. $url; - } - $user->url = clean_param($user->url, PARAM_URL); - $userdetails['url'] = $user->url; - } - - if (in_array('icq', $userfields) && $user->icq && (!isset($hiddenfields['icqnumber']) or $isadmin)) { - $userdetails['icq'] = $user->icq; - } - - if (in_array('skype', $userfields) && $user->skype && (!isset($hiddenfields['skypeid']) or $isadmin)) { - $userdetails['skype'] = $user->skype; - } - if (in_array('yahoo', $userfields) && $user->yahoo && (!isset($hiddenfields['yahooid']) or $isadmin)) { - $userdetails['yahoo'] = $user->yahoo; - } - if (in_array('aim', $userfields) && $user->aim && (!isset($hiddenfields['aimid']) or $isadmin)) { - $userdetails['aim'] = $user->aim; - } - if (in_array('msn', $userfields) && $user->msn && (!isset($hiddenfields['msnid']) or $isadmin)) { - $userdetails['msn'] = $user->msn; - } - if (in_array('firstaccess', $userfields) && (!isset($hiddenfields['firstaccess']) or $isadmin)) { if ($user->firstaccess) { $userdetails['firstaccess'] = $user->firstaccess; diff --git a/user/profile.php b/user/profile.php index f0f7c26..14c1238 100755 --- a/user/profile.php +++ b/user/profile.php @@ -321,55 +321,6 @@ if (isset($identityfields['email']) and ($currentuser echo html_writer::tag('dd', obfuscate_mailto($user->email, '')); } -if ($user->url && !isset($hiddenfields['webpage'])) { - $url = $user->url; - if (strpos($user->url, '://') === false) { - $url = 'http://'. $url; - } - $webpageurl = new moodle_url($url); - echo html_writer::tag('dt', get_string('webpage')); - echo html_writer::tag('dd', html_writer::link($webpageurl, s($user->url))); -} - -if ($user->icq && !isset($hiddenfields['icqnumber'])) { - $imurl = new moodle_url('http://web.icq.com/wwp', array('uin' => $user->icq) ); - $iconurl = new moodle_url('http://web.icq.com/whitepages/online', array('icq' => $user->icq, 'img' => '5')); - $statusicon = html_writer::tag('img', '', array('src' => $iconurl, 'class' => 'icon icon-post', 'alt' => get_string('status'))); - echo html_writer::tag('dt', get_string('icqnumber')); - echo html_writer::tag('dd', html_writer::link($imurl, s($user->icq) . $statusicon)); -} - -if ($user->skype && !isset($hiddenfields['skypeid'])) { - $imurl = 'skype:'.urlencode($user->skype).'?call'; - $iconurl = new moodle_url('http://mystatus.skype.com/smallicon/'.urlencode($user->skype)); - if (is_https()) { - // Bad luck, skype devs are lazy to set up SSL on their servers - see MDL-37233. - $statusicon = ''; - } else { - $statusicon = html_writer::empty_tag('img', - array('src' => $iconurl, 'class' => 'icon icon-post', 'alt' => get_string('status'))); - } - echo html_writer::tag('dt', get_string('skypeid')); - echo html_writer::tag('dd', html_writer::link($imurl, s($user->skype) . $statusicon)); -} -if ($user->yahoo && !isset($hiddenfields['yahooid'])) { - $imurl = new moodle_url('http://edit.yahoo.com/config/send_webmesg', array('.target' => $user->yahoo, '.src' => 'pg')); - $iconurl = new moodle_url('http://opi.yahoo.com/online', array('u' => $user->yahoo, 'm' => 'g', 't' => '0')); - $statusicon = html_writer::tag('img', '', - array('src' => $iconurl, 'class' => 'iconsmall icon-post', 'alt' => get_string('status'))); - echo html_writer::tag('dt', get_string('yahooid')); - echo html_writer::tag('dd', html_writer::link($imurl, s($user->yahoo) . $statusicon)); -} -if ($user->aim && !isset($hiddenfields['aimid'])) { - $imurl = 'aim:goim?screenname='.urlencode($user->aim); - echo html_writer::tag('dt', get_string('aimid')); - echo html_writer::tag('dd', html_writer::link($imurl, s($user->aim))); -} -if ($user->msn && !isset($hiddenfields['msnid'])) { - echo html_writer::tag('dt', get_string('msnid')); - echo html_writer::tag('dd', s($user->msn)); -} - // Print the Custom User Fields. profile_display_fields($user->id);
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.67 |
proxy
|
phpinfo
|
Settings