sanitize submitted numerical values; merged from MOODLE_16_STABLE

This commit is contained in:
skodak 2006-05-26 11:54:11 +00:00
parent 2042e021be
commit 9054ba924a

View File

@ -65,6 +65,10 @@ function scorm_add_instance($scorm) {
$scorm->width = str_replace('%','',$scorm->width);
$scorm->height = str_replace('%','',$scorm->height);
//sanitize submitted values a bit
$scorm->width = clean_param($scorm->width, PARAM_INT);
$scorm->height = clean_param($scorm->height, PARAM_INT);
$id = insert_record('scorm', $scorm);
if (basename($scorm->reference) != 'imsmanifest.xml') {