Permalink
Browse files

Simplify anydb_escape_string() to use simple-cross-db addslashes(). M…

…DL-13793 ; backported from 19_STABLE
  • Loading branch information...
stronk7
stronk7 committed Mar 4, 2008
1 parent d8a7a8f commit b6a671d65308863a2f67d1bac323b0551f672ca8
Showing with 1 addition and 13 deletions.
  1. +1 −13 mod/wiki/ewikimoodlelib.php
@@ -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.