diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-08-09 14:13:42 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-08-09 14:42:28 +0200 |
commit | ef9360d28532cf04b99a7c352b8897b79587ba37 (patch) | |
tree | 97a9661c0e7463a0c59673a5c7e4bf1f427637ff | |
parent | 37a1874782629286cb3c7750b2dc1ffa8427e73c (diff) | |
download | forums-ef9360d28532cf04b99a7c352b8897b79587ba37.tar forums-ef9360d28532cf04b99a7c352b8897b79587ba37.tar.gz forums-ef9360d28532cf04b99a7c352b8897b79587ba37.tar.bz2 forums-ef9360d28532cf04b99a7c352b8897b79587ba37.tar.xz forums-ef9360d28532cf04b99a7c352b8897b79587ba37.zip |
[ticket/12710] Pass the original column data to the create function
PHPBB3-12710
-rw-r--r-- | phpBB/phpbb/db/tools.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index 69c6f17416..72bc7d72f1 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -2291,6 +2291,7 @@ class tools */ function sql_column_change($table_name, $column_name, $column_data, $inline = false) { + $original_column_data = $column_data; $column_data = $this->sql_prepare_column_data($table_name, $column_name, $column_data); $statements = array(); @@ -2379,7 +2380,7 @@ class tools $temp_column_name = substr(md5($column_name), 0, 30); // Add a temporary table with the new type - $result = $this->sql_column_add($table_name, $temp_column_name, $column_data); + $result = $this->sql_column_add($table_name, $temp_column_name, $original_column_data); $statements = array_merge($statements, $result); // Copy the data to the new column @@ -2390,7 +2391,7 @@ class tools $statements = array_merge($statements, $result); // Recreate the original column with the new type - $result = $this->sql_column_add($table_name, $column_name, $column_data); + $result = $this->sql_column_add($table_name, $column_name, $original_column_data); $statements = array_merge($statements, $result); if (!empty($indexes)) |