Permalink
Browse files

Merge branch 'master_MDL-18392_slash_cleanup' of git://github.com/dan…

…marsden/moodle
  • Loading branch information...
2 parents e87ca54 + 4f6e39d commit 6b7fb3366190cf305675d749192ff920351563c1 @skodak skodak committed Apr 17, 2011
Showing with 3 additions and 4 deletions.
  1. +1 −1 mod/scorm/aicc.php
  2. +2 −3 mod/scorm/locallib.php
View
2 mod/scorm/aicc.php
@@ -267,7 +267,7 @@
$value .= $datarow."\r\n";
next($datarows);
}
- $value = rawurlencode(stripslashes($value)); // TODO: this is probably wrong, the stripslashes() has undefined meaning now; was this related to JS quoting or magic quotes?
+ $value = rawurlencode($value);
$id = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, $element, $value);
}
}
View
5 mod/scorm/locallib.php
@@ -387,7 +387,7 @@ function scorm_insert_track($userid,$scormid,$scoid,$attempt,$element,$value,$fo
if ($track = $DB->get_record('scorm_scoes_track',array('userid'=>$userid, 'scormid'=>$scormid, 'scoid'=>$scoid, 'attempt'=>$attempt, 'element'=>$element))) {
if ($element != 'x.start.time' ) { //don't update x.start.time - keep the original value.
- $track->value = addslashes_js($value);
+ $track->value = $value;
$track->timemodified = time();
$DB->update_record('scorm_scoes_track',$track);
$id = $track->id;
@@ -398,7 +398,7 @@ function scorm_insert_track($userid,$scormid,$scoid,$attempt,$element,$value,$fo
$track->scoid = $scoid;
$track->attempt = $attempt;
$track->element = $element;
- $track->value = addslashes_js($value);
+ $track->value = $value;
$track->timemodified = time();
$id = $DB->insert_record('scorm_scoes_track',$track);
}
@@ -436,7 +436,6 @@ function scorm_get_tracks($scoid,$userid,$attempt='') {
$usertrack->timemodified = 0;
foreach ($tracks as $track) {
$element = $track->element;
- $track->value = stripslashes($track->value); // TODO: this is probably wrong, the stripslashes() has undefined meaning now; was this related to JS quoting or magic quotes?
$usertrack->{$element} = $track->value;
switch ($element) {
case 'cmi.core.lesson_status':

0 comments on commit 6b7fb33

Please sign in to comment.