From 22aa2b7c52c93c6869a8776e509da8df8d10480d Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 3 Feb 2007 02:17:46 +0000 Subject: #7742 (and some unfound bugs :D), thanks Mr_E git-svn-id: file:///svn/phpbb/trunk@6960 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index bf8dfd7b9c..b68eab59be 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -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) -- cgit v1.2.1