From 405aca353253c2c727ed9343bdb19b6aff5884c1 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Fri, 11 May 2012 13:42:27 +0800 Subject: [PATCH] MDL-32942 libraries: Replaced deprecated PARAM_ACTION and PARAM_FORMAT with PARAM_ALPHANUMEXT --- admin/auth.php | 2 +- admin/editors.php | 2 +- admin/enrol.php | 2 +- admin/environment.php | 2 +- admin/filters.php | 2 +- admin/licenses.php | 2 +- admin/portfolio.php | 2 +- admin/repository.php | 2 +- admin/roles/allow.php | 2 +- admin/tool/unsuproles/index.php | 2 +- admin/webservice/forms.php | 4 ++-- admin/webservice/protocols.php | 2 +- admin/webservice/service.php | 2 +- admin/webservice/service_functions.php | 2 +- admin/webservice/tokens.php | 2 +- blog/edit_form.php | 2 +- enrol/ajax.php | 2 +- enrol/bulkchange.php | 2 +- enrol/cohort/ajax.php | 2 +- enrol/instances.php | 2 +- enrol/manual/ajax.php | 2 +- enrol/otherusers.php | 2 +- enrol/users.php | 2 +- enrol/users_forms.php | 4 ++-- grade/edit/outcome/import_outcomes_form.php | 2 +- lib/moodlelib.php | 2 ++ lib/tests/performance/filtersettingsperformancetester.php | 2 +- mod/glossary/formats.php | 2 +- mod/lti/typessettings.php | 2 +- mod/wiki/editcomments.php | 2 +- mod/wiki/instancecomments.php | 2 +- question/type/essay/question.php | 2 +- repository/lib.php | 2 +- repository/manage_instances.php | 2 +- user/managetoken.php | 4 ++-- user/profile/index_category_form.php | 2 +- user/profile/index_field_form.php | 2 +- 37 files changed, 41 insertions(+), 39 deletions(-) diff --git a/admin/auth.php b/admin/auth.php index 93711ee8324..c5ebb80b758 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -18,7 +18,7 @@ $returnurl = new moodle_url('/admin/settings.php', array('section'=>'manageauths $PAGE->set_url($returnurl); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $auth = optional_param('auth', '', PARAM_PLUGIN); get_enabled_auth_plugins(true); // fix the list of enabled auths diff --git a/admin/editors.php b/admin/editors.php index fbb7be5aac4..743d083e43b 100644 --- a/admin/editors.php +++ b/admin/editors.php @@ -13,7 +13,7 @@ require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); $returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageeditors"; -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $editor = optional_param('editor', '', PARAM_PLUGIN); // get currently installed and enabled auth plugins diff --git a/admin/enrol.php b/admin/enrol.php index ab14a23440a..dee82d3c559 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -26,7 +26,7 @@ require_once('../config.php'); require_once($CFG->libdir.'/adminlib.php'); -$action = required_param('action', PARAM_ACTION); +$action = required_param('action', PARAM_ALPHANUMEXT); $enrol = required_param('enrol', PARAM_PLUGIN); $confirm = optional_param('confirm', 0, PARAM_BOOL); diff --git a/admin/environment.php b/admin/environment.php index 1fc732ea064..5c74f7f6365 100644 --- a/admin/environment.php +++ b/admin/environment.php @@ -33,7 +33,7 @@ require_once($CFG->libdir.'/environmentlib.php'); require_once($CFG->libdir.'/componentlib.class.php'); // Parameters -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $version = optional_param('version', '', PARAM_FILE); // $extraurlparams = array(); diff --git a/admin/filters.php b/admin/filters.php index 0d7faa3c088..5c3a19165dd 100644 --- a/admin/filters.php +++ b/admin/filters.php @@ -34,7 +34,7 @@ require_once(dirname(__FILE__) . '/../config.php'); require_once($CFG->libdir . '/adminlib.php'); - $action = optional_param('action', '', PARAM_ACTION); + $action = optional_param('action', '', PARAM_ALPHANUMEXT); $filterpath = optional_param('filterpath', '', PARAM_PATH); require_login(); diff --git a/admin/licenses.php b/admin/licenses.php index dfd843d009d..517ba85291d 100644 --- a/admin/licenses.php +++ b/admin/licenses.php @@ -28,7 +28,7 @@ require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); $returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=managelicenses"; -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $license = optional_param('license', '', PARAM_SAFEDIR); //////////////////////////////////////////////////////////////////////////////// diff --git a/admin/portfolio.php b/admin/portfolio.php index 791c79f9489..09a769577c3 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -5,7 +5,7 @@ require_once($CFG->libdir . '/portfoliolib.php'); require_once($CFG->libdir . '/portfolio/forms.php'); require_once($CFG->libdir . '/adminlib.php'); -$portfolio = optional_param('pf', '', PARAM_FORMAT); +$portfolio = optional_param('pf', '', PARAM_ALPHANUMEXT); $action = optional_param('action', '', PARAM_ALPHA); $sure = optional_param('sure', '', PARAM_ALPHA); diff --git a/admin/repository.php b/admin/repository.php index b3494cab5a5..377a006fc67 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -19,7 +19,7 @@ require_once($CFG->dirroot . '/repository/lib.php'); require_once($CFG->libdir . '/adminlib.php'); $repository = optional_param('repos', '', PARAM_ALPHANUMEXT); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $sure = optional_param('sure', '', PARAM_ALPHA); $downloadcontents = optional_param('downloadcontents', false, PARAM_BOOL); diff --git a/admin/roles/allow.php b/admin/roles/allow.php index 52078e7f181..45e9b038673 100644 --- a/admin/roles/allow.php +++ b/admin/roles/allow.php @@ -28,7 +28,7 @@ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->libdir . '/adminlib.php'); require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php'); -$mode = required_param('mode', PARAM_ACTION); +$mode = required_param('mode', PARAM_ALPHANUMEXT); $classformode = array( 'assign' => 'role_allow_assign_page', 'override' => 'role_allow_override_page', diff --git a/admin/tool/unsuproles/index.php b/admin/tool/unsuproles/index.php index 0018ec1bdd7..144df3420e8 100644 --- a/admin/tool/unsuproles/index.php +++ b/admin/tool/unsuproles/index.php @@ -27,7 +27,7 @@ require_once(dirname(__FILE__) . '/../../../config.php'); require_once($CFG->libdir.'/adminlib.php'); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $syscontext = get_context_instance(CONTEXT_SYSTEM); diff --git a/admin/webservice/forms.php b/admin/webservice/forms.php index 13e1c3ddc4f..fef6a753fe8 100644 --- a/admin/webservice/forms.php +++ b/admin/webservice/forms.php @@ -168,7 +168,7 @@ class external_service_functions_form extends moodleform { $mform->setType('id', PARAM_INT); $mform->addElement('hidden', 'action'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $this->add_action_buttons(true, get_string('addfunctions', 'webservice')); @@ -236,7 +236,7 @@ class web_service_token_form extends moodleform { get_string('validuntil', 'webservice'), array('optional' => true)); $mform->addElement('hidden', 'action'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $this->add_action_buttons(true); diff --git a/admin/webservice/protocols.php b/admin/webservice/protocols.php index 6448a96a996..9e7fcfb1548 100644 --- a/admin/webservice/protocols.php +++ b/admin/webservice/protocols.php @@ -35,7 +35,7 @@ require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); $returnurl = $CFG->wwwroot . "/" . $CFG->admin . "/settings.php?section=webserviceprotocols"; -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $webservice = optional_param('webservice', '', PARAM_SAFEDIR); $confirm = optional_param('confirm', 0, PARAM_BOOL); diff --git a/admin/webservice/service.php b/admin/webservice/service.php index f8761d35f81..a933ec4af41 100644 --- a/admin/webservice/service.php +++ b/admin/webservice/service.php @@ -40,7 +40,7 @@ $PAGE->navbar->add(get_string('externalservice', 'webservice')); //Retrieve few general parameters $id = required_param('id', PARAM_INT); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $confirm = optional_param('confirm', 0, PARAM_BOOL); $webservicemanager = new webservice; $renderer = $PAGE->get_renderer('core', 'webservice'); diff --git a/admin/webservice/service_functions.php b/admin/webservice/service_functions.php index 1b2fd225333..3df598487d8 100644 --- a/admin/webservice/service_functions.php +++ b/admin/webservice/service_functions.php @@ -30,7 +30,7 @@ require_once('forms.php'); $serviceid = required_param('id', PARAM_INT); $functionid = optional_param('fid', 0, PARAM_INT); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $confirm = optional_param('confirm', 0, PARAM_BOOL); admin_externalpage_setup('externalservicefunctions'); diff --git a/admin/webservice/tokens.php b/admin/webservice/tokens.php index cf229ab5446..7e1766325b6 100644 --- a/admin/webservice/tokens.php +++ b/admin/webservice/tokens.php @@ -28,7 +28,7 @@ require_once($CFG->libdir . '/adminlib.php'); require_once($CFG->dirroot . '/' . $CFG->admin . '/webservice/forms.php'); require_once($CFG->libdir . '/externallib.php'); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $tokenid = optional_param('tokenid', '', PARAM_SAFEDIR); $confirm = optional_param('confirm', 0, PARAM_BOOL); diff --git a/blog/edit_form.php b/blog/edit_form.php index 292d55cf7af..bd10367b733 100644 --- a/blog/edit_form.php +++ b/blog/edit_form.php @@ -111,7 +111,7 @@ class blog_edit_form extends moodleform { $this->add_action_buttons(); $mform->addElement('hidden', 'action'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $mform->setDefault('action', ''); $mform->addElement('hidden', 'entryid'); diff --git a/enrol/ajax.php b/enrol/ajax.php index 8a0bdfc09a7..3e855188546 100644 --- a/enrol/ajax.php +++ b/enrol/ajax.php @@ -35,7 +35,7 @@ require_once("$CFG->dirroot/group/lib.php"); // Must have the sesskey $id = required_param('id', PARAM_INT); // course id -$action = required_param('action', PARAM_ACTION); +$action = required_param('action', PARAM_ALPHANUMEXT); $PAGE->set_url(new moodle_url('/enrol/ajax.php', array('id'=>$id, 'action'=>$action))); diff --git a/enrol/bulkchange.php b/enrol/bulkchange.php index d033a56ed67..827b9fd1922 100644 --- a/enrol/bulkchange.php +++ b/enrol/bulkchange.php @@ -32,7 +32,7 @@ require_once("$CFG->dirroot/group/lib.php"); $id = required_param('id', PARAM_INT); // course id $bulkuserop = required_param('bulkuserop', PARAM_ALPHANUMEXT); $userids = required_param_array('bulkuser', PARAM_INT); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $filter = optional_param('ifilter', 0, PARAM_INT); $course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST); diff --git a/enrol/cohort/ajax.php b/enrol/cohort/ajax.php index e65d1ed8456..91d4131e260 100644 --- a/enrol/cohort/ajax.php +++ b/enrol/cohort/ajax.php @@ -35,7 +35,7 @@ require_once($CFG->dirroot.'/group/lib.php'); // Must have the sesskey $id = required_param('id', PARAM_INT); // course id -$action = required_param('action', PARAM_ACTION); +$action = required_param('action', PARAM_ALPHANUMEXT); $PAGE->set_url(new moodle_url('/enrol/cohort/ajax.php', array('id'=>$id, 'action'=>$action))); diff --git a/enrol/instances.php b/enrol/instances.php index 3f8b2dbccdd..3007273a7cb 100644 --- a/enrol/instances.php +++ b/enrol/instances.php @@ -26,7 +26,7 @@ require('../config.php'); $id = required_param('id', PARAM_INT); // course id -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $instanceid = optional_param('instance', 0, PARAM_INT); $confirm = optional_param('confirm', 0, PARAM_BOOL); diff --git a/enrol/manual/ajax.php b/enrol/manual/ajax.php index a9d5bb7f804..b480a0e2890 100644 --- a/enrol/manual/ajax.php +++ b/enrol/manual/ajax.php @@ -34,7 +34,7 @@ require_once($CFG->dirroot.'/group/lib.php'); // Must have the sesskey $id = required_param('id', PARAM_INT); // course id -$action = required_param('action', PARAM_ACTION); +$action = required_param('action', PARAM_ALPHANUMEXT); $PAGE->set_url(new moodle_url('/enrol/ajax.php', array('id'=>$id, 'action'=>$action))); diff --git a/enrol/otherusers.php b/enrol/otherusers.php index 52b34bfe829..9a70689eb70 100644 --- a/enrol/otherusers.php +++ b/enrol/otherusers.php @@ -29,7 +29,7 @@ require_once("$CFG->dirroot/enrol/renderer.php"); require_once("$CFG->dirroot/group/lib.php"); $id = required_param('id', PARAM_INT); // course id -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $filter = optional_param('ifilter', 0, PARAM_INT); $course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST); diff --git a/enrol/users.php b/enrol/users.php index 2ebbab5ec8b..eb6beedbfc3 100644 --- a/enrol/users.php +++ b/enrol/users.php @@ -30,7 +30,7 @@ require_once("$CFG->dirroot/enrol/renderer.php"); require_once("$CFG->dirroot/group/lib.php"); $id = required_param('id', PARAM_INT); // course id -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $filter = optional_param('ifilter', 0, PARAM_INT); $course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST); diff --git a/enrol/users_forms.php b/enrol/users_forms.php index 7263688fdde..63599508caa 100644 --- a/enrol/users_forms.php +++ b/enrol/users_forms.php @@ -56,7 +56,7 @@ class enrol_users_assign_form extends moodleform { $mform->setType('user', PARAM_INT); $mform->addElement('hidden', 'action'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $mform->addElement('hidden', 'ifilter'); $mform->setType('ifilter', PARAM_ALPHA); @@ -110,7 +110,7 @@ class enrol_users_addmember_form extends moodleform { $mform->setType('user', PARAM_INT); $mform->addElement('hidden', 'action'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $mform->addElement('hidden', 'ifilter'); $mform->setType('ifilter', PARAM_ALPHA); diff --git a/grade/edit/outcome/import_outcomes_form.php b/grade/edit/outcome/import_outcomes_form.php index 4a263c8693e..e7e4a1ea1d6 100644 --- a/grade/edit/outcome/import_outcomes_form.php +++ b/grade/edit/outcome/import_outcomes_form.php @@ -36,7 +36,7 @@ class import_outcomes_form extends moodleform { $mform =& $this->_form; $mform->addElement('hidden', 'action', 'upload'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $mform->addElement('hidden', 'courseid', $PAGE->course->id); $mform->setType('id', PARAM_INT); diff --git a/lib/moodlelib.php b/lib/moodlelib.php index b2c6223bb46..dcbef78db72 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -265,12 +265,14 @@ define('PARAM_NUMBER', 'float'); /** * PARAM_ACTION - deprecated alias for PARAM_ALPHANUMEXT, use for various actions in forms and urls * NOTE: originally alias for PARAM_APLHA + * @deprecated since 2.0 */ define('PARAM_ACTION', 'alphanumext'); /** * PARAM_FORMAT - deprecated alias for PARAM_ALPHANUMEXT, use for names of plugins, formats, etc. * NOTE: originally alias for PARAM_APLHA + * @deprecated since 2.0 */ define('PARAM_FORMAT', 'alphanumext'); diff --git a/lib/tests/performance/filtersettingsperformancetester.php b/lib/tests/performance/filtersettingsperformancetester.php index c7122c2dab8..bb387375286 100644 --- a/lib/tests/performance/filtersettingsperformancetester.php +++ b/lib/tests/performance/filtersettingsperformancetester.php @@ -62,7 +62,7 @@ foreach ($requiredtables as $table) { } } -switch (optional_param('action', '', PARAM_ACTION)) { +switch (optional_param('action', '', PARAM_ALPHANUMEXT)) { case 'setup': require_sesskey(); if ($issetup == 0) { diff --git a/mod/glossary/formats.php b/mod/glossary/formats.php index 5d6500974db..2a5764cbda4 100644 --- a/mod/glossary/formats.php +++ b/mod/glossary/formats.php @@ -7,7 +7,7 @@ require_once($CFG->libdir.'/adminlib.php'); require_once("lib.php"); $id = required_param('id', PARAM_INT); -$mode = optional_param('mode', '', PARAM_ACTION); +$mode = optional_param('mode', '', PARAM_ALPHANUMEXT); $url = new moodle_url('/mod/glossary/formats.php', array('id'=>$id)); if ($mode !== '') { diff --git a/mod/lti/typessettings.php b/mod/lti/typessettings.php index 037aa509241..d9c8d9b6a8c 100644 --- a/mod/lti/typessettings.php +++ b/mod/lti/typessettings.php @@ -53,7 +53,7 @@ require_once($CFG->libdir.'/adminlib.php'); require_once($CFG->dirroot.'/mod/lti/edit_form.php'); require_once($CFG->dirroot.'/mod/lti/locallib.php'); -$action = optional_param('action', null, PARAM_ACTION); +$action = optional_param('action', null, PARAM_ALPHANUMEXT); $id = optional_param('id', null, PARAM_INT); $tab = optional_param('tab', '', PARAM_ALPHAEXT); diff --git a/mod/wiki/editcomments.php b/mod/wiki/editcomments.php index 5f04d17ddf0..13c9ebc58fb 100644 --- a/mod/wiki/editcomments.php +++ b/mod/wiki/editcomments.php @@ -36,7 +36,7 @@ require_once($CFG->dirroot . '/mod/wiki/locallib.php'); require_once($CFG->dirroot . '/mod/wiki/pagelib.php'); $pageid = required_param('pageid', PARAM_INT); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $commentid = optional_param('commentid', 0, PARAM_INT); if (!$page = wiki_get_page($pageid)) { diff --git a/mod/wiki/instancecomments.php b/mod/wiki/instancecomments.php index 731d6dd5381..1294c826c3a 100644 --- a/mod/wiki/instancecomments.php +++ b/mod/wiki/instancecomments.php @@ -38,7 +38,7 @@ require_once($CFG->dirroot . "/mod/wiki/locallib.php"); require_once($CFG->dirroot . '/mod/wiki/comments_form.php'); $pageid = required_param('pageid', PARAM_TEXT); -$action = optional_param('action', '', PARAM_ACTION); +$action = optional_param('action', '', PARAM_ALPHANUMEXT); $id = optional_param('id', 0, PARAM_INT); $commentid = optional_param('commentid', 0, PARAM_INT); $newcontent = optional_param('newcontent', '', PARAM_CLEANHTML); diff --git a/question/type/essay/question.php b/question/type/essay/question.php index 3f3c2c4e284..fa0ed9b2ada 100644 --- a/question/type/essay/question.php +++ b/question/type/essay/question.php @@ -59,7 +59,7 @@ class qtype_essay_question extends question_with_responses { } else { $expecteddata = array('answer' => PARAM_CLEANHTML); } - $expecteddata['answerformat'] = PARAM_FORMAT; + $expecteddata['answerformat'] = PARAM_ALPHANUMEXT; if ($this->attachments != 0) { $expecteddata['attachments'] = question_attempt::PARAM_FILES; } diff --git a/repository/lib.php b/repository/lib.php index c34dec75b7b..2b64c23796e 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -2395,7 +2395,7 @@ final class repository_instance_form extends moodleform { $mform->addElement('hidden', 'edit', ($this->instance) ? $this->instance->id : 0); $mform->setType('edit', PARAM_INT); $mform->addElement('hidden', 'new', $this->plugin); - $mform->setType('new', PARAM_FORMAT); + $mform->setType('new', PARAM_ALPHANUMEXT); $mform->addElement('hidden', 'plugin', $this->plugin); $mform->setType('plugin', PARAM_PLUGIN); $mform->addElement('hidden', 'typeid', $this->typeid); diff --git a/repository/manage_instances.php b/repository/manage_instances.php index 5b5d1c897e8..a6b1363798d 100644 --- a/repository/manage_instances.php +++ b/repository/manage_instances.php @@ -30,7 +30,7 @@ require_once(dirname(dirname(__FILE__)) . '/config.php'); require_once($CFG->dirroot . '/repository/lib.php'); $edit = optional_param('edit', 0, PARAM_INT); -$new = optional_param('new', '', PARAM_FORMAT); +$new = optional_param('new', '', PARAM_ALPHANUMEXT); $delete = optional_param('delete', 0, PARAM_INT); $sure = optional_param('sure', '', PARAM_ALPHA); $contextid = optional_param('contextid', 0, PARAM_INT); diff --git a/user/managetoken.php b/user/managetoken.php index 1c62bd901f9..c8f47b2af88 100644 --- a/user/managetoken.php +++ b/user/managetoken.php @@ -44,7 +44,7 @@ if ( !is_siteadmin($USER->id) && has_capability('moodle/webservice:createtoken', $usercontext )) { require($CFG->dirroot.'/webservice/lib.php'); - $action = optional_param('action', '', PARAM_ACTION); + $action = optional_param('action', '', PARAM_ALPHANUMEXT); $tokenid = optional_param('tokenid', '', PARAM_SAFEDIR); $confirm = optional_param('confirm', 0, PARAM_BOOL); @@ -83,7 +83,7 @@ if ( !is_siteadmin($USER->id) if (!empty($CFG->enablerssfeeds)) { require_once($CFG->dirroot.'/lib/rsslib.php'); - $action = optional_param('action', '', PARAM_ACTION); + $action = optional_param('action', '', PARAM_ALPHANUMEXT); $confirm = optional_param('confirm', 0, PARAM_BOOL); $rssrenderer = $PAGE->get_renderer('core', 'rss'); diff --git a/user/profile/index_category_form.php b/user/profile/index_category_form.php index ee8acc48770..26ab6271b51 100644 --- a/user/profile/index_category_form.php +++ b/user/profile/index_category_form.php @@ -20,7 +20,7 @@ class category_form extends moodleform { $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); $mform->addElement('hidden', 'action', 'editcategory'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $mform->addElement('text', 'name', get_string('profilecategoryname', 'admin'), 'maxlength="255" size="30"'); $mform->setType('name', PARAM_MULTILANG); diff --git a/user/profile/index_field_form.php b/user/profile/index_field_form.php index a891504e92f..e5e09a24ae1 100644 --- a/user/profile/index_field_form.php +++ b/user/profile/index_field_form.php @@ -28,7 +28,7 @@ class field_form extends moodleform { $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); $mform->addElement('hidden', 'action', 'editfield'); - $mform->setType('action', PARAM_ACTION); + $mform->setType('action', PARAM_ALPHANUMEXT); $mform->addElement('hidden', 'datatype', $datatype); $mform->setType('datatype', PARAM_ALPHA);