Permalink
Browse files

SCORM MDL-20955 addslashes fixes

  • Loading branch information...
1 parent 3e52ba1 commit 54add7c3fa7a5c4d087c6079f562ab37586b5ff2 @danmarsden danmarsden committed Nov 24, 2009
Showing with 10 additions and 10 deletions.
  1. +10 −10 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) {
@@ -245,44 +245,44 @@ function scorm_parse_aicc($pkgdir,$scormid) {
$id = null;
if ($oldscoid = scorm_array_search('identifier',$sco->identifier,$oldscoes)) {
$sco->id = $oldscoid;
- $id = update_record('scorm_scoes',$sco);
+ $id = update_record('scorm_scoes',addslashes_recursive($sco));
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 54add7c

Please sign in to comment.