MDL-10607 - also support backslashes in dbuser/password in installer

merged from MOODLE_19_STABLE
This commit is contained in:
poltawski
2007-12-23 14:15:50 +00:00
parent 8ebb324b04
commit 5690e088fc
+4 -3
View 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);
}
?>