mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Simplify anydb_escape_string() to use simple-cross-db addslashes(). MDL-13793 ; backported from 19_STABLE
This commit is contained in:
parent
d8a7a8f691
commit
b6a671d653
1 changed files with 1 additions and 13 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue