mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-35991 - use PARAM_LOCALURL for local urls
This commit is contained in:
parent
f7551c2e62
commit
fd1d829500
backup
comment
course
mod/wiki
tag
user
@ -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 = context::instance_by_id($contextid, IGNORE_MISSING);
|
||||
|
@ -38,7 +38,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));
|
||||
|
||||
@ -84,4 +84,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');
|
||||
|
@ -35,7 +35,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);
|
||||
|
@ -32,7 +32,7 @@ if (isguestuser()) {
|
||||
die();
|
||||
}
|
||||
|
||||
$returnurl = optional_param('returnurl', '', PARAM_URL);
|
||||
$returnurl = optional_param('returnurl', '', PARAM_LOCALURL);
|
||||
|
||||
if (empty($returnurl)) {
|
||||
$returnurl = new moodle_url('/user/files.php');
|
||||
|
Loading…
x
Reference in New Issue
Block a user