mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-13 20:44:43 +01:00
#7742 (and some unfound bugs :D), thanks Mr_E
git-svn-id: file:///svn/phpbb/trunk@6960 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fa075585e3
commit
22aa2b7c52
@ -1052,13 +1052,13 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data)
|
||||
preg_match('#\((.*)\)#s', $row['sql'], $matches);
|
||||
|
||||
$new_table_cols = trim($matches[1]);
|
||||
$old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols);
|
||||
$old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
|
||||
$column_list = array();
|
||||
|
||||
foreach ($old_table_cols as $declaration)
|
||||
{
|
||||
$entities = preg_split('#\s+#', trim($declaration));
|
||||
if ($entities == 'PRIMARY')
|
||||
if ($entities[0] == 'PRIMARY')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1171,13 +1171,13 @@ function sql_create_primary_key($dbms, $table_name, $column)
|
||||
preg_match('#\((.*)\)#s', $row['sql'], $matches);
|
||||
|
||||
$new_table_cols = trim($matches[1]);
|
||||
$old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols);
|
||||
$old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
|
||||
$column_list = array();
|
||||
|
||||
foreach ($old_table_cols as $declaration)
|
||||
{
|
||||
$entities = preg_split('#\s+#', trim($declaration));
|
||||
if ($entities == 'PRIMARY')
|
||||
if ($entities[0] == 'PRIMARY')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1262,7 +1262,7 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
|
||||
preg_match('#\((.*)\)#s', $row['sql'], $matches);
|
||||
|
||||
$new_table_cols = trim($matches[1]);
|
||||
$old_table_cols = preg_split('/,(?=[\\sa-z])/im', $new_table_cols);
|
||||
$old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
|
||||
$column_list = array();
|
||||
|
||||
foreach ($old_table_cols as $key => $declaration)
|
||||
|
Loading…
x
Reference in New Issue
Block a user