mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11700] Escape Backslashes from schema_data.sql for MySQLi
PHPBB3-11700
This commit is contained in:
parent
ed55626165
commit
625411587d
1 changed files with 6 additions and 1 deletions
|
@ -1179,7 +1179,7 @@ class install_install extends module
|
||||||
// Ok tables have been built, let's fill in the basic information
|
// Ok tables have been built, let's fill in the basic information
|
||||||
$sql_query = file_get_contents('schemas/schema_data.sql');
|
$sql_query = file_get_contents('schemas/schema_data.sql');
|
||||||
|
|
||||||
// Deal with any special comments
|
// Deal with any special comments and characters
|
||||||
switch ($data['dbms'])
|
switch ($data['dbms'])
|
||||||
{
|
{
|
||||||
case 'mssql':
|
case 'mssql':
|
||||||
|
@ -1191,6 +1191,11 @@ class install_install extends module
|
||||||
case 'postgres':
|
case 'postgres':
|
||||||
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
|
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'mysql':
|
||||||
|
case 'mysqli':
|
||||||
|
$sql_query = str_replace('\\', '\\\\', $sql_query);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change prefix
|
// Change prefix
|
||||||
|
|
Loading…
Add table
Reference in a new issue