Permalink
Browse files

SCORM MDL-20955 addslashes fixes

  • Loading branch information...
1 parent 0c60d23 commit b2d99131e83a8407e470a36535a04322a9a2fdb8 @danmarsden danmarsden committed Nov 24, 2009
Showing with 9 additions and 9 deletions.
  1. +9 −9 mod/scorm/datamodels/aicclib.php
@@ -215,10 +215,10 @@ function scorm_parse_aicc($pkgdir,$scormid) {
//print_r($sco);
if (get_record('scorm_scoes','scorm',$scormid,'identifier',$sco->identifier)) {
- $id = update_record('scorm_scoes',$sco);
+ $id = update_record('scorm_scoes',addslashes_recursive($sco));
unset($oldscoes[$id]);
} else {
- $id = insert_record('scorm_scoes',$sco);
+ $id = insert_record('scorm_scoes',addslashes_recursive($sco));
}
if ($launch == 0) {
@@ -249,40 +249,40 @@ function scorm_parse_aicc($pkgdir,$scormid) {
delete_records('scorm_scoes_data','scoid',$oldscoid);
unset($oldscoes[$oldscoid]);
} else {
- $id = insert_record('scorm_scoes',$sco);
+ $id = insert_record('scorm_scoes',addslashes_recursive($sco));
}
if (!empty($id)) {
unset($scodata);
$scodata->scoid = $id;
if (isset($element->web_launch)) {
$scodata->name = 'parameters';
$scodata->value = $element->web_launch;
- $dataid = insert_record('scorm_scoes_data',$scodata);
+ $dataid = insert_record('scorm_scoes_data',addslashes_recursive($scodata));
}
if (isset($element->prerequisites)) {
$scodata->name = 'prerequisites';
$scodata->value = $element->prerequisites;
- $dataid = insert_record('scorm_scoes_data',$scodata);
+ $dataid = insert_record('scorm_scoes_data',addslashes_recursive($scodata));
}
if (isset($element->max_time_allowed)) {
$scodata->name = 'max_time_allowed';
$scodata->value = $element->max_time_allowed;
- $dataid = insert_record('scorm_scoes_data',$scodata);
+ $dataid = insert_record('scorm_scoes_data',addslashes_recursive($scodata));
}
if (isset($element->time_limit_action)) {
$scodata->name = 'time_limit_action';
$scodata->value = $element->time_limit_action;
- $dataid = insert_record('scorm_scoes_data',$scodata);
+ $dataid = insert_record('scorm_scoes_data',addslashes_recursive($scodata));
}
if (isset($element->mastery_score)) {
$scodata->name = 'mastery_score';
$scodata->value = $element->mastery_score;
- $dataid = insert_record('scorm_scoes_data',$scodata);
+ $dataid = insert_record('scorm_scoes_data',addslashes_recursive($scodata));
}
if (isset($element->core_vendor)) {
$scodata->name = 'datafromlms';
$scodata->value = eregi_replace('<cr>', "\r\n", $element->core_vendor);
- $dataid = insert_record('scorm_scoes_data',$scodata);
+ $dataid = insert_record('scorm_scoes_data',addslashes_recursive($scodata));
}
}
if ($launch==0) {

0 comments on commit b2d9913

Please sign in to comment.