]> git.mjollnir.org Git - moodle.git/commitdiff
Simplify anydb_escape_string() to use simple-cross-db addslashes(). MDL-13793 ; merge...
authorstronk7 <stronk7>
Tue, 4 Mar 2008 23:41:37 +0000 (23:41 +0000)
committerstronk7 <stronk7>
Tue, 4 Mar 2008 23:41:37 +0000 (23:41 +0000)
mod/wiki/ewikimoodlelib.php

index 37758e0708050d20f1c24f606fbacccf544beee0..db9a7ffa57ea052b777f6e7fd8430691b634f738 100644 (file)
@@ -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));
 }