]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10607 - also support backslashes in dbuser/password in installer
authorpoltawski <poltawski>
Sun, 23 Dec 2007 14:15:50 +0000 (14:15 +0000)
committerpoltawski <poltawski>
Sun, 23 Dec 2007 14:15:50 +0000 (14:15 +0000)
merged from MOODLE_19_STABLE

install.php

index 63b25faa03a588b79481c76b45cb1abe3abe3c70..e36d68d2c07e4bb42b464787a6be1841c7098233 100644 (file)
@@ -1282,10 +1282,11 @@ function toggledbinfo() {
 }
 
 /**
- * Add slashes for single quotes so they can be
- * included in single quoted string
+ * Add slashes for single quotes and backslashes
+ * so they can be included in single quoted string
+ * (for config.php)
  */
 function addsingleslashes($input){
-    return str_replace("'", "\'", $input);
+    return preg_replace("/(['\\\])/", "\\\\$1", $input);
 }
 ?>