Permalink
Browse files
MDL-20406 improved param validation
- Loading branch information
Showing
with
2 additions
and
2 deletions.
-
+1
−1
mod/wiki/ewiki/ewiki.php
-
+1
−1
mod/wiki/ewiki/plugins/moodle/downloads.php
|
@@ -1271,7 +1271,7 @@ function ewiki_page_info($id, &$data, $action) { |
|
|
} |
|
|
elseif ($i == "userid") { |
|
|
$i = 'author'; |
|
|
if ($user = get_record('user', 'id', $value)) { |
|
|
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; |
|
|
} |
|
|
0 comments on commit
fbd941a