Skip to content

Commit

Permalink
Simplify anydb_escape_string() to use simple-cross-db addslashes(). M…
Browse files Browse the repository at this point in the history
…DL-13793 ; backported from 19_STABLE
  • Loading branch information
stronk7 committed Mar 4, 2008
1 parent d8a7a8f commit b6a671d
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions mod/wiki/ewikimoodlelib.php
Expand Up @@ -301,18 +301,6 @@ function ewiki_database_moodle($action, &$args, $sw1, $sw2) {
}

function anydb_escape_string($s) {
global $CFG ;
switch ($CFG->dbfamily) {
case 'mysql':
$s = mysql_escape_string($s);
break;
case 'postgres':
$s = pg_escape_string($s);
break;
default:
$s = addslashes($s);
}

return($s);
return(addslashes($s));
}

0 comments on commit b6a671d

Please sign in to comment.