BUG 9226 gulliver propel-build-sql script needs user and pass
- the script propel-build-sql was using mysql_real_escape_string, and this function needs to connect to database in order to make a good and real escape needs - the function mysql_real_escape string was changed for a simple alternative, and this code does not need to connect to database.
This commit is contained in:
@@ -92,7 +92,10 @@ class MysqlPlatform extends DefaultPlatform {
|
||||
* @return string
|
||||
*/
|
||||
public function escapeText($text) {
|
||||
return mysql_real_escape_string($text);
|
||||
$search = array("\x00", "\n", "\r", "\\", "'", "\"", "\x1a");
|
||||
$replace = array("\\x00", "\\n", "\\r", "\\\\" ,"\'", "\\\"", "\\\x1a");
|
||||
return str_replace($search, $replace, $text);
|
||||
//return mysql_real_escape_string($text);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user