From 74c8a06e3ea4e02f7aee69dca86c0c9b1ead7e8d Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 4 Mar 2008 23:40:14 +0000 Subject: [PATCH] Simplify anydb_escape_string() to use simple-cross-db addslashes(). MDL-13793 --- mod/wiki/ewikimoodlelib.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mod/wiki/ewikimoodlelib.php b/mod/wiki/ewikimoodlelib.php index 37758e07080..db9a7ffa57e 100644 --- a/mod/wiki/ewikimoodlelib.php +++ b/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)); }