MDL-20406 improved param validation

This commit is contained in:
skodak
2009-10-05 17:51:14 +00:00
parent 9c40410a22
commit fbd941aa94
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
}