Removing learnpath::escape_string

skala
Julio Montoya 13 years ago
parent 54de7ca6f7
commit 542dff144e
  1. 4
      main/newscorm/aicc_hacp.php
  2. 1
      main/newscorm/learnpath.class.php
  3. 6
      main/newscorm/scormResource.class.php

@ -91,10 +91,10 @@ if (!empty($_REQUEST['command'])) {
case 'getparam':
// Request for all available data to be printed out in the answer.
if (!empty($_REQUEST['version'])) {
$hacp_version = learnpath::escape_string($_REQUEST['version']);
$hacp_version = Database::escape_string($_REQUEST['version']);
}
if (!empty($_REQUEST['session_id'])) {
$hacp_session_id = learnpath::escape_string($_REQUEST['session_id']);
$hacp_session_id = Database::escape_string($_REQUEST['session_id']);
}
$error_code = 0;
$error_text = $errors[$error_code];

@ -1324,6 +1324,7 @@ class learnpath {
* Escapes a string with the available database escape function
* @param string String to escape
* @return string String escaped
* @deprecated use Database::escape_string
*/
public function escape_string($string) {
//if ($this->debug > 0) { error_log('New LP - In learnpath::escape_string('.$string.')', 0); }

@ -114,8 +114,7 @@ class scormResource {
*/
public function get_path() {
if (!empty($this->href)) {
require_once 'learnpath.class.php';
return learnpath::escape_string($this->href);
return Database::escape_string($this->href);
} else {
return '';
}
@ -127,8 +126,7 @@ class scormResource {
*/
public function get_scorm_type() {
if (!empty($this->scormtype)) {
require_once 'learnpath.class.php';
return learnpath::escape_string($this->scormtype);
return Database::escape_string($this->scormtype);
} else {
return '';
}

Loading…
Cancel
Save