MDL-35991 - use PARAM_LOCALURL for local urls
Conflicts: user/files.php
This commit is contained in:
committed by
Dan Poltawski
parent
4e805e91c7
commit
b0f20bc995
@@ -33,7 +33,7 @@ $currentcontext = required_param('currentcontext', PARAM_INT);
|
||||
// file parameters
|
||||
$component = optional_param('component', null, PARAM_COMPONENT);
|
||||
$filearea = optional_param('filearea', null, PARAM_AREA);
|
||||
$returnurl = optional_param('returnurl', null, PARAM_URL);
|
||||
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($currentcontext);
|
||||
$filecontext = get_context_instance_by_id($contextid);
|
||||
|
||||
@@ -34,7 +34,7 @@ $action = optional_param('action', '', PARAM_ALPHA);
|
||||
$area = optional_param('area', '', PARAM_AREA);
|
||||
$content = optional_param('content', '', PARAM_RAW);
|
||||
$itemid = optional_param('itemid', '', PARAM_INT);
|
||||
$returnurl = optional_param('returnurl', '/', PARAM_URL);
|
||||
$returnurl = optional_param('returnurl', '/', PARAM_LOCALURL);
|
||||
$component = optional_param('component', '', PARAM_COMPONENT);
|
||||
|
||||
// Currently this script can only add comments
|
||||
|
||||
@@ -35,7 +35,7 @@ require_once($CFG->dirroot.'/course/lib.php');
|
||||
|
||||
$id = required_param('id', PARAM_INT);
|
||||
$switchrole = optional_param('switchrole',-1, PARAM_INT);
|
||||
$returnurl = optional_param('returnurl', false, PARAM_URL);
|
||||
$returnurl = optional_param('returnurl', false, PARAM_LOCALURL);
|
||||
|
||||
$PAGE->set_url('/course/switchrole.php', array('id'=>$id));
|
||||
|
||||
@@ -86,4 +86,4 @@ if ($returnurl === false) {
|
||||
$returnurl = new moodle_url('/course/view.php', array('id' => $course->id));
|
||||
}
|
||||
|
||||
redirect($returnurl);
|
||||
redirect($returnurl);
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once("$CFG->dirroot/repository/lib.php");
|
||||
$subwikiid = required_param('subwiki', PARAM_INT);
|
||||
// not being used for file management, we use it to generate navbar link
|
||||
$pageid = optional_param('pageid', 0, PARAM_INT);
|
||||
$returnurl = optional_param('returnurl', '', PARAM_URL);
|
||||
$returnurl = optional_param('returnurl', '', PARAM_LOCALURL);
|
||||
|
||||
if (!$subwiki = wiki_get_subwiki($subwikiid)) {
|
||||
print_error('incorrectsubwikiid', 'wiki');
|
||||
|
||||
@@ -15,7 +15,7 @@ if (empty($CFG->usetags)) {
|
||||
print_error('tagsaredisabled', 'tag');
|
||||
}
|
||||
|
||||
$returnurl = optional_param('returnurl', null, PARAM_TEXT);
|
||||
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
|
||||
$keyword = optional_param('coursetag_new_tag', '', PARAM_TEXT);
|
||||
$courseid = optional_param('entryid', 0, PARAM_INT);
|
||||
$userid = optional_param('userid', 0, PARAM_INT);
|
||||
|
||||
Reference in New Issue
Block a user