From 071e68f93e145aadf69a7c898bb0539a839515b1 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Fri, 11 May 2012 15:50:09 +0800 Subject: [PATCH] MDL-32945 libraries: Replaced deprecated PARAM_MULTILANG with PARAM_TEXT --- admin/roles/lib.php | 2 +- admin/tool/uploaduser/user_form.php | 8 ++++---- blocks/blog_tags/edit_form.php | 2 +- blocks/glossary_random/edit_form.php | 2 +- blocks/html/edit_form.php | 2 +- blocks/mentees/edit_form.php | 2 +- blocks/tag_flickr/edit_form.php | 2 +- blocks/tag_youtube/edit_form.php | 2 +- blocks/tags/edit_form.php | 2 +- cohort/edit_form.php | 2 +- course/edit_form.php | 4 ++-- course/request_form.php | 4 ++-- enrol/externallib.php | 2 +- grade/report/grader/ajax_callbacks.php | 2 +- group/autogroup_form.php | 4 ++-- group/group_form.php | 2 +- group/grouping_form.php | 2 +- lib/adminlib.php | 2 +- lib/moodlelib.php | 1 + mod/quiz/addrandomform.php | 2 +- question/category_form.php | 4 ++-- question/format.php | 4 ++-- user/editlib.php | 10 +++++----- user/externallib.php | 4 ++-- user/profile/definelib.php | 2 +- user/profile/field/menu/define.class.php | 4 ++-- user/profile/field/text/define.class.php | 2 +- user/profile/field/text/field.class.php | 2 +- user/profile/index_category_form.php | 2 +- 29 files changed, 43 insertions(+), 42 deletions(-) diff --git a/admin/roles/lib.php b/admin/roles/lib.php index 212cd211c6fda..490e0a133c89b 100644 --- a/admin/roles/lib.php +++ b/admin/roles/lib.php @@ -604,7 +604,7 @@ public function read_submitted_permissions() { } // Role name. - $name = optional_param('name', null, PARAM_MULTILANG); + $name = optional_param('name', null, PARAM_TEXT); if (!is_null($name)) { $this->role->name = $name; // Hack: short names of standard roles are equal to archetypes, empty name means localised via lang packs. diff --git a/admin/tool/uploaduser/user_form.php b/admin/tool/uploaduser/user_form.php index 7e7d790fd9788..08d2c0e8a1fd2 100644 --- a/admin/tool/uploaduser/user_form.php +++ b/admin/tool/uploaduser/user_form.php @@ -249,7 +249,7 @@ function definition () { } $mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"'); - $mform->setType('city', PARAM_MULTILANG); + $mform->setType('city', PARAM_TEXT); if (empty($CFG->defaultcity)) { $mform->setDefault('city', $templateuser->city); } else { @@ -288,11 +288,11 @@ function definition () { $mform->setType('idnumber', PARAM_NOTAGS); $mform->addElement('text', 'institution', get_string('institution'), 'maxlength="40" size="25"'); - $mform->setType('institution', PARAM_MULTILANG); + $mform->setType('institution', PARAM_TEXT); $mform->setDefault('institution', $templateuser->institution); $mform->addElement('text', 'department', get_string('department'), 'maxlength="30" size="25"'); - $mform->setType('department', PARAM_MULTILANG); + $mform->setType('department', PARAM_TEXT); $mform->setDefault('department', $templateuser->department); $mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"'); @@ -304,7 +304,7 @@ function definition () { $mform->setAdvanced('phone2'); $mform->addElement('text', 'address', get_string('address'), 'maxlength="70" size="25"'); - $mform->setType('address', PARAM_MULTILANG); + $mform->setType('address', PARAM_TEXT); $mform->setAdvanced('address'); // Next the profile defaults diff --git a/blocks/blog_tags/edit_form.php b/blocks/blog_tags/edit_form.php index 1571066013cb0..8d59fa97326b2 100644 --- a/blocks/blog_tags/edit_form.php +++ b/blocks/blog_tags/edit_form.php @@ -36,7 +36,7 @@ protected function specific_definition($mform) { $mform->addElement('text', 'config_title', get_string('blocktitle', 'blog')); $mform->setDefault('config_title', get_string('blogtags', 'blog')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); $numberoftags = array(); for($i = 1; $i <= 50; $i++) { diff --git a/blocks/glossary_random/edit_form.php b/blocks/glossary_random/edit_form.php index 70682bd3e83e1..d745aa3329c1e 100644 --- a/blocks/glossary_random/edit_form.php +++ b/blocks/glossary_random/edit_form.php @@ -38,7 +38,7 @@ protected function specific_definition($mform) { $mform->addElement('text', 'config_title', get_string('title', 'block_glossary_random')); $mform->setDefault('config_title', get_string('pluginname','block_glossary_random')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); // Select glossaries to put in dropdown box ... $glossaries = $DB->get_records_menu('glossary', array('course' => $this->block->course->id), 'name', 'id,name'); diff --git a/blocks/html/edit_form.php b/blocks/html/edit_form.php index aa7b4661de8cc..b7251905e5887 100644 --- a/blocks/html/edit_form.php +++ b/blocks/html/edit_form.php @@ -35,7 +35,7 @@ protected function specific_definition($mform) { $mform->addElement('header', 'configheader', get_string('blocksettings', 'block')); $mform->addElement('text', 'config_title', get_string('configtitle', 'block_html')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); $editoroptions = array('maxfiles' => EDITOR_UNLIMITED_FILES, 'noclean'=>true, 'context'=>$this->block->context); $mform->addElement('editor', 'config_text', get_string('configcontent', 'block_html'), null, $editoroptions); diff --git a/blocks/mentees/edit_form.php b/blocks/mentees/edit_form.php index 760d5fdbe0b39..5b3430d79397c 100644 --- a/blocks/mentees/edit_form.php +++ b/blocks/mentees/edit_form.php @@ -35,6 +35,6 @@ protected function specific_definition($mform) { $mform->addElement('header', 'configheader', get_string('blocksettings', 'block')); $mform->addElement('text', 'config_title', get_string('configtitleblankhides', 'block_mentees')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); } } \ No newline at end of file diff --git a/blocks/tag_flickr/edit_form.php b/blocks/tag_flickr/edit_form.php index 51898466f3349..309f7482cfacb 100644 --- a/blocks/tag_flickr/edit_form.php +++ b/blocks/tag_flickr/edit_form.php @@ -34,7 +34,7 @@ protected function specific_definition($mform) { $mform->addElement('header', 'configheader', get_string('blocksettings', 'block')); $mform->addElement('text', 'config_title', get_string('configtitle', 'block_tag_flickr')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); $mform->addElement('text', 'config_numberofphotos', get_string('numberofphotos', 'block_tag_flickr'), array('size' => 5)); $mform->setType('config_numberofvideos', PARAM_INTEGER); diff --git a/blocks/tag_youtube/edit_form.php b/blocks/tag_youtube/edit_form.php index 47b4e5810845f..6275ff96f2378 100644 --- a/blocks/tag_youtube/edit_form.php +++ b/blocks/tag_youtube/edit_form.php @@ -34,7 +34,7 @@ protected function specific_definition($mform) { $mform->addElement('header', 'configheader', get_string('blocksettings', 'block')); $mform->addElement('text', 'config_title', get_string('configtitle', 'block_tag_youtube')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); $mform->addElement('text', 'config_numberofvideos', get_string('numberofvideos', 'block_tag_youtube'), array('size' => 5)); $mform->setType('config_numberofvideos', PARAM_INTEGER); diff --git a/blocks/tags/edit_form.php b/blocks/tags/edit_form.php index eec32025a9bfc..ea7f3cb9cb369 100644 --- a/blocks/tags/edit_form.php +++ b/blocks/tags/edit_form.php @@ -35,7 +35,7 @@ protected function specific_definition($mform) { $mform->addElement('header', 'configheader', get_string('blocksettings', 'block')); $mform->addElement('text', 'config_title', get_string('pluginname', 'block_tags')); - $mform->setType('config_title', PARAM_MULTILANG); + $mform->setType('config_title', PARAM_TEXT); $mform->setDefault('config_title', get_string('pluginname', 'block_tags')); $numberoftags = array(); diff --git a/cohort/edit_form.php b/cohort/edit_form.php index d449980f87e62..a030ce20232ee 100644 --- a/cohort/edit_form.php +++ b/cohort/edit_form.php @@ -43,7 +43,7 @@ public function definition() { $mform->addElement('text', 'name', get_string('name', 'cohort'), 'maxlength="254" size="50"'); $mform->addRule('name', get_string('required'), 'required', null, 'client'); - $mform->setType('name', PARAM_MULTILANG); + $mform->setType('name', PARAM_TEXT); $options = $this->get_category_options($cohort->contextid); $mform->addElement('select', 'contextid', get_string('context', 'role'), $options); diff --git a/course/edit_form.php b/course/edit_form.php index 1b7584981b52c..e665c039c4e0a 100644 --- a/course/edit_form.php +++ b/course/edit_form.php @@ -79,7 +79,7 @@ function definition() { $mform->addElement('text','fullname', get_string('fullnamecourse'),'maxlength="254" size="50"'); $mform->addHelpButton('fullname', 'fullnamecourse'); $mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client'); - $mform->setType('fullname', PARAM_MULTILANG); + $mform->setType('fullname', PARAM_TEXT); if (!empty($course->id) and !has_capability('moodle/course:changefullname', $coursecontext)) { $mform->hardFreeze('fullname'); $mform->setConstant('fullname', $course->fullname); @@ -88,7 +88,7 @@ function definition() { $mform->addElement('text', 'shortname', get_string('shortnamecourse'), 'maxlength="100" size="20"'); $mform->addHelpButton('shortname', 'shortnamecourse'); $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client'); - $mform->setType('shortname', PARAM_MULTILANG); + $mform->setType('shortname', PARAM_TEXT); if (!empty($course->id) and !has_capability('moodle/course:changeshortname', $coursecontext)) { $mform->hardFreeze('shortname'); $mform->setConstant('shortname', $course->shortname); diff --git a/course/request_form.php b/course/request_form.php index 80e60f0be8ec2..e74e40bdf7113 100644 --- a/course/request_form.php +++ b/course/request_form.php @@ -61,12 +61,12 @@ function definition() { $mform->addElement('text', 'fullname', get_string('fullnamecourse'), 'maxlength="254" size="50"'); $mform->addHelpButton('fullname', 'fullnamecourse'); $mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client'); - $mform->setType('fullname', PARAM_MULTILANG); + $mform->setType('fullname', PARAM_TEXT); $mform->addElement('text', 'shortname', get_string('shortnamecourse'), 'maxlength="100" size="20"'); $mform->addHelpButton('shortname', 'shortnamecourse'); $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client'); - $mform->setType('shortname', PARAM_MULTILANG); + $mform->setType('shortname', PARAM_TEXT); $mform->addElement('editor', 'summary_editor', get_string('summary'), null, course_request::summary_editor_options()); $mform->addHelpButton('summary_editor', 'coursesummary'); diff --git a/enrol/externallib.php b/enrol/externallib.php index 147383c9808e4..1b842cca39cb9 100644 --- a/enrol/externallib.php +++ b/enrol/externallib.php @@ -263,7 +263,7 @@ public static function get_enrolled_users_returns() { 'lastname' => new external_value(PARAM_NOTAGS, 'The family name of the user', VALUE_OPTIONAL), 'fullname' => new external_value(PARAM_NOTAGS, 'The fullname of the user'), 'email' => new external_value(PARAM_TEXT, 'An email address - allow email as root@localhost', VALUE_OPTIONAL), - 'address' => new external_value(PARAM_MULTILANG, 'Postal address', VALUE_OPTIONAL), + 'address' => new external_value(PARAM_TEXT, 'Postal address', VALUE_OPTIONAL), 'phone1' => new external_value(PARAM_NOTAGS, 'Phone 1', VALUE_OPTIONAL), 'phone2' => new external_value(PARAM_NOTAGS, 'Phone 2', VALUE_OPTIONAL), 'icq' => new external_value(PARAM_NOTAGS, 'icq number', VALUE_OPTIONAL), diff --git a/grade/report/grader/ajax_callbacks.php b/grade/report/grader/ajax_callbacks.php index 034ef18c2dc69..1630f850b239f 100644 --- a/grade/report/grader/ajax_callbacks.php +++ b/grade/report/grader/ajax_callbacks.php @@ -33,7 +33,7 @@ $itemid = optional_param('itemid', false, PARAM_INT); $type = optional_param('type', false, PARAM_ALPHA); $action = optional_param('action', false, PARAM_ALPHA); -$newvalue = optional_param('newvalue', false, PARAM_MULTILANG); +$newvalue = optional_param('newvalue', false, PARAM_TEXT); /// basic access checks if (!$course = $DB->get_record('course', array('id' => $courseid))) { diff --git a/group/autogroup_form.php b/group/autogroup_form.php index 5b39965de689c..36343b525737f 100644 --- a/group/autogroup_form.php +++ b/group/autogroup_form.php @@ -102,7 +102,7 @@ function definition() { $mform->addElement('text', 'namingscheme', get_string('namingscheme', 'group')); $mform->addHelpButton('namingscheme', 'namingscheme', 'group'); $mform->addRule('namingscheme', get_string('required'), 'required', null, 'client'); - $mform->setType('namingscheme', PARAM_MULTILANG); + $mform->setType('namingscheme', PARAM_TEXT); // there must not be duplicate group names in course $template = get_string('grouptemplate', 'group'); $gname = groups_parse_name($template, 0); @@ -123,7 +123,7 @@ function definition() { } $mform->addElement('text', 'groupingname', get_string('groupingname', 'group'), $options); - $mform->setType('groupingname', PARAM_MULTILANG); + $mform->setType('groupingname', PARAM_TEXT); $mform->disabledIf('groupingname', 'grouping', 'noteq', '-1'); $mform->addElement('hidden','courseid'); diff --git a/group/group_form.php b/group/group_form.php index 18fe0990b257c..98f2c9dda1349 100644 --- a/group/group_form.php +++ b/group/group_form.php @@ -50,7 +50,7 @@ function definition () { $mform->addElement('text','name', get_string('groupname', 'group'),'maxlength="254" size="50"'); $mform->addRule('name', get_string('required'), 'required', null, 'client'); - $mform->setType('name', PARAM_MULTILANG); + $mform->setType('name', PARAM_TEXT); $mform->addElement('text','idnumber', get_string('idnumbergroup'), 'maxlength="100" size="10"'); $mform->addHelpButton('idnumber', 'idnumbergroup'); diff --git a/group/grouping_form.php b/group/grouping_form.php index 63248ab180588..1f15bc78b5fc3 100644 --- a/group/grouping_form.php +++ b/group/grouping_form.php @@ -52,7 +52,7 @@ function definition () { $mform->addElement('text','name', get_string('groupingname', 'group'),'maxlength="254" size="50"'); $mform->addRule('name', get_string('required'), 'required', null, 'server'); - $mform->setType('name', PARAM_MULTILANG); + $mform->setType('name', PARAM_TEXT); $mform->addElement('text','idnumber', get_string('idnumbergrouping'), 'maxlength="100" size="10"'); $mform->addHelpButton('idnumber', 'idnumbergrouping'); diff --git a/lib/adminlib.php b/lib/adminlib.php index 0626e66258161..ece35ca87c3b5 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -3243,7 +3243,7 @@ public function get_setting() { * @return mixed true or message string */ public function validate($data) { - $cleaned = clean_param($data, PARAM_MULTILANG); + $cleaned = clean_param($data, PARAM_TEXT); if ($cleaned === '') { return get_string('required'); } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index b2c6223bb4630..ebb9d111eff5c 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -276,6 +276,7 @@ /** * PARAM_MULTILANG - deprecated alias of PARAM_TEXT. + * @deprecated since 2.0 */ define('PARAM_MULTILANG', 'text'); diff --git a/mod/quiz/addrandomform.php b/mod/quiz/addrandomform.php index 3b37a1d4de32c..fa8a2e947ebba 100644 --- a/mod/quiz/addrandomform.php +++ b/mod/quiz/addrandomform.php @@ -60,7 +60,7 @@ protected function definition() { get_string('randomquestionusinganewcategory', 'quiz')); $mform->addElement('text', 'name', get_string('name'), 'maxlength="254" size="50"'); - $mform->setType('name', PARAM_MULTILANG); + $mform->setType('name', PARAM_TEXT); $mform->addElement('questioncategory', 'parent', get_string('parentcategory', 'question'), array('contexts' => $usablecontexts, 'top' => true)); diff --git a/question/category_form.php b/question/category_form.php index 357b1a4f8be56..600ee88862543 100644 --- a/question/category_form.php +++ b/question/category_form.php @@ -57,11 +57,11 @@ protected function definition() { $mform->addElement('text', 'name', get_string('name'),'maxlength="254" size="50"'); $mform->setDefault('name', ''); $mform->addRule('name', get_string('categorynamecantbeblank', 'question'), 'required', null, 'client'); - $mform->setType('name', PARAM_MULTILANG); + $mform->setType('name', PARAM_TEXT); $mform->addElement('textarea', 'info', get_string('categoryinfo', 'question'), array('rows'=> '10', 'cols'=>'45')); $mform->setDefault('info', ''); - $mform->setType('info', PARAM_MULTILANG); + $mform->setType('info', PARAM_TEXT); $this->add_action_buttons(false, get_string('addcategory', 'question')); diff --git a/question/format.php b/question/format.php index 0ccdbce99e9c7..9b0bf37b99c71 100644 --- a/question/format.php +++ b/question/format.php @@ -849,7 +849,7 @@ protected function assemble_category_path($names) { * Convert a string, as returned by {@link assemble_category_path()}, * back into an array of category names. * - * Each category name is cleaned by a call to clean_param(, PARAM_MULTILANG), + * Each category name is cleaned by a call to clean_param(, PARAM_TEXT), * which matches the cleaning in question/category_form.php. * * @param string $path @@ -859,7 +859,7 @@ protected function split_category_path($path) { $rawnames = preg_split('~(?addHelpButton('screenreader', 'screenreaderuse'); $mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"'); - $mform->setType('city', PARAM_MULTILANG); + $mform->setType('city', PARAM_TEXT); $mform->addRule('city', $strrequired, 'required', null, 'client'); if (!empty($CFG->defaultcity)) { $mform->setDefault('city', $CFG->defaultcity); @@ -282,7 +282,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager $mform->addHelpButton('imagefile', 'newpicture'); $mform->addElement('text', 'imagealt', get_string('imagealt'), 'maxlength="100" size="30"'); - $mform->setType('imagealt', PARAM_MULTILANG); + $mform->setType('imagealt', PARAM_TEXT); } @@ -317,10 +317,10 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager $mform->setType('idnumber', PARAM_NOTAGS); $mform->addElement('text', 'institution', get_string('institution'), 'maxlength="40" size="25"'); - $mform->setType('institution', PARAM_MULTILANG); + $mform->setType('institution', PARAM_TEXT); $mform->addElement('text', 'department', get_string('department'), 'maxlength="30" size="25"'); - $mform->setType('department', PARAM_MULTILANG); + $mform->setType('department', PARAM_TEXT); $mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"'); $mform->setType('phone1', PARAM_NOTAGS); @@ -329,7 +329,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager $mform->setType('phone2', PARAM_NOTAGS); $mform->addElement('text', 'address', get_string('address'), 'maxlength="70" size="25"'); - $mform->setType('address', PARAM_MULTILANG); + $mform->setType('address', PARAM_TEXT); } diff --git a/user/externallib.php b/user/externallib.php index c1d57bc07e717..417c8b1e66539 100644 --- a/user/externallib.php +++ b/user/externallib.php @@ -452,7 +452,7 @@ public static function get_users_by_id_returns() { 'lastname' => new external_value(PARAM_NOTAGS, 'The family name of the user', VALUE_OPTIONAL), 'fullname' => new external_value(PARAM_NOTAGS, 'The fullname of the user'), 'email' => new external_value(PARAM_TEXT, 'An email address - allow email as root@localhost', VALUE_OPTIONAL), - 'address' => new external_value(PARAM_MULTILANG, 'Postal address', VALUE_OPTIONAL), + 'address' => new external_value(PARAM_TEXT, 'Postal address', VALUE_OPTIONAL), 'phone1' => new external_value(PARAM_NOTAGS, 'Phone 1', VALUE_OPTIONAL), 'phone2' => new external_value(PARAM_NOTAGS, 'Phone 2', VALUE_OPTIONAL), 'icq' => new external_value(PARAM_NOTAGS, 'icq number', VALUE_OPTIONAL), @@ -604,7 +604,7 @@ public static function get_course_user_profiles_returns() { 'lastname' => new external_value(PARAM_NOTAGS, 'The family name of the user', VALUE_OPTIONAL), 'fullname' => new external_value(PARAM_NOTAGS, 'The fullname of the user'), 'email' => new external_value(PARAM_TEXT, 'An email address - allow email as root@localhost', VALUE_OPTIONAL), - 'address' => new external_value(PARAM_MULTILANG, 'Postal address', VALUE_OPTIONAL), + 'address' => new external_value(PARAM_TEXT, 'Postal address', VALUE_OPTIONAL), 'phone1' => new external_value(PARAM_NOTAGS, 'Phone 1', VALUE_OPTIONAL), 'phone2' => new external_value(PARAM_NOTAGS, 'Phone 2', VALUE_OPTIONAL), 'icq' => new external_value(PARAM_NOTAGS, 'icq number', VALUE_OPTIONAL), diff --git a/user/profile/definelib.php b/user/profile/definelib.php index 50ecbd964a902..c73baf32486fc 100644 --- a/user/profile/definelib.php +++ b/user/profile/definelib.php @@ -29,7 +29,7 @@ function define_form_common(&$form) { $form->addElement('text', 'name', get_string('profilename', 'admin'), 'size="50"'); $form->addRule('name', $strrequired, 'required', null, 'client'); - $form->setType('name', PARAM_MULTILANG); + $form->setType('name', PARAM_TEXT); $form->addElement('editor', 'description', get_string('profiledescription', 'admin'), null, null); diff --git a/user/profile/field/menu/define.class.php b/user/profile/field/menu/define.class.php index e26d0f771b299..fb29323502f9d 100644 --- a/user/profile/field/menu/define.class.php +++ b/user/profile/field/menu/define.class.php @@ -5,11 +5,11 @@ class profile_define_menu extends profile_define_base { function define_form_specific($form) { /// Param 1 for menu type contains the options $form->addElement('textarea', 'param1', get_string('profilemenuoptions', 'admin'), array('rows' => 6, 'cols' => 40)); - $form->setType('param1', PARAM_MULTILANG); + $form->setType('param1', PARAM_TEXT); /// Default data $form->addElement('text', 'defaultdata', get_string('profiledefaultdata', 'admin'), 'size="50"'); - $form->setType('defaultdata', PARAM_MULTILANG); + $form->setType('defaultdata', PARAM_TEXT); } function define_validate_specific($data, $files) { diff --git a/user/profile/field/text/define.class.php b/user/profile/field/text/define.class.php index fe7731c034c57..191b758545e37 100644 --- a/user/profile/field/text/define.class.php +++ b/user/profile/field/text/define.class.php @@ -5,7 +5,7 @@ class profile_define_text extends profile_define_base { function define_form_specific($form) { /// Default data $form->addElement('text', 'defaultdata', get_string('profiledefaultdata', 'admin'), 'size="50"'); - $form->setType('defaultdata', PARAM_MULTILANG); + $form->setType('defaultdata', PARAM_TEXT); /// Param 1 for text type is the size of the field $form->addElement('text', 'param1', get_string('profilefieldsize', 'admin'), 'size="6"'); diff --git a/user/profile/field/text/field.class.php b/user/profile/field/text/field.class.php index de726ae5030a1..9c4b43307b1c4 100644 --- a/user/profile/field/text/field.class.php +++ b/user/profile/field/text/field.class.php @@ -33,7 +33,7 @@ function edit_field_add($mform) { /// Create the form field $mform->addElement($fieldtype, $this->inputname, format_string($this->field->name), 'maxlength="'.$maxlength.'" size="'.$size.'" '); - $mform->setType($this->inputname, PARAM_MULTILANG); + $mform->setType($this->inputname, PARAM_TEXT); } } diff --git a/user/profile/index_category_form.php b/user/profile/index_category_form.php index ee8acc4877075..1ee3bf80f5e23 100644 --- a/user/profile/index_category_form.php +++ b/user/profile/index_category_form.php @@ -23,7 +23,7 @@ function definition () { $mform->setType('action', PARAM_ACTION); $mform->addElement('text', 'name', get_string('profilecategoryname', 'admin'), 'maxlength="255" size="30"'); - $mform->setType('name', PARAM_MULTILANG); + $mform->setType('name', PARAM_TEXT); $mform->addRule('name', $strrequired, 'required', null, 'client'); $this->add_action_buttons(true);