aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-02-03 02:17:46 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-02-03 02:17:46 +0000
commit22aa2b7c52c93c6869a8776e509da8df8d10480d (patch)
treeefda70d1c6053527444f881e4d3ec86b7be98e30 /phpBB
parentfa075585e382f85ec3e7ce8ec16135a7dfb99fb2 (diff)
downloadforums-22aa2b7c52c93c6869a8776e509da8df8d10480d.tar
forums-22aa2b7c52c93c6869a8776e509da8df8d10480d.tar.gz
forums-22aa2b7c52c93c6869a8776e509da8df8d10480d.tar.bz2
forums-22aa2b7c52c93c6869a8776e509da8df8d10480d.tar.xz
forums-22aa2b7c52c93c6869a8776e509da8df8d10480d.zip
#7742 (and some unfound bugs :D), thanks Mr_E
git-svn-id: file:///svn/phpbb/trunk@6960 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/install/database_update.php10
1 files changed, 5 insertions, 5 deletions
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)