Permalink
Browse files

MDL-32945 libraries: Replaced deprecated PARAM_MULTILANG with PARAM_TEXT

  • Loading branch information...
1 parent 3294034 commit 071e68f93e145aadf69a7c898bb0539a839515b1 @rajeshtaneja rajeshtaneja committed May 11, 2012
View
2 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.
View
8 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
View
2 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++) {
View
2 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');
View
2 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);
View
2 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);
}
}
View
2 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);
View
2 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);
View
2 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();
View
2 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);
View
4 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);
View
4 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');
View
2 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),
View
2 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))) {
View
4 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');
View
2 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');
View
2 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');
View
2 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');
}
View
1 lib/moodlelib.php
@@ -276,6 +276,7 @@
/**
* PARAM_MULTILANG - deprecated alias of PARAM_TEXT.
+ * @deprecated since 2.0
*/
define('PARAM_MULTILANG', 'text');
View
2 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));
View
4 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'));
View
4 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('~(?<!/)/(?!/)~', $path);
$names = array();
foreach ($rawnames as $rawname) {
- $names[] = clean_param(trim(str_replace('//', '/', $rawname)), PARAM_MULTILANG);
+ $names[] = clean_param(trim(str_replace('//', '/', $rawname)), PARAM_TEXT);
}
return $names;
}
View
10 user/editlib.php
@@ -224,7 +224,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager
$mform->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);
}
View
4 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),
View
2 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);
View
4 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) {
View
2 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"');
View
2 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);
}
}
View
2 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);

0 comments on commit 071e68f

Please sign in to comment.