MDL-20406 improved param validation
This commit is contained in:
@@ -1271,7 +1271,7 @@ function ewiki_page_info($id, &$data, $action) {
|
||||
$value = preg_replace_callback("/((\w+:)?([".EWIKI_CHARS_U."]+[".EWIKI_CHARS_L."]+){2,}[\w\d]*)/", "ewiki_link_regex_callback", $value);
|
||||
}
|
||||
elseif ($i == "userid") {
|
||||
$i = 'author';
|
||||
$i = 'author';
|
||||
if ($user = get_record('user', 'id', (int)$value)) {
|
||||
if (!isset($course->id)) {
|
||||
$course->id = 1;
|
||||
|
||||
@@ -345,7 +345,7 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) {
|
||||
$info->comment = format_text($p_comment);
|
||||
|
||||
if ($fullinfo) {
|
||||
if ($user = get_record('user', 'id', $row['userid'])) {
|
||||
if ($user = get_record('user', 'id', (int)$row['userid'])) {
|
||||
if (!isset($course->id)) {
|
||||
$course->id = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user