diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-09 14:10:44 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-09 14:10:44 +0000 |
| commit | 2b35b9d60d42c750485ba84b31818fad0b4e0a91 (patch) | |
| tree | aca204f65d9e65f3b10433af1cb6e42daca9b89e /phpBB/install/install_convert.php | |
| parent | 164fb66f44322ccf5997cff8ccf154a1aa7f01d3 (diff) | |
| download | forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar.gz forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar.bz2 forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.tar.xz forums-2b35b9d60d42c750485ba84b31818fad0b4e0a91.zip | |
- some bugfixes
- bugfixes for the convertor (typecasting for example was totally broken)
git-svn-id: file:///svn/phpbb/trunk@6865 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_convert.php')
| -rw-r--r-- | phpBB/install/install_convert.php | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 03ed5d7f40..a4b5629596 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -479,6 +479,24 @@ class install_convert extends module // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues $config['max_post_chars'] = -1; + $convert->mysql_convert = false; + + switch ($db->sql_layer) + { + // Thanks MySQL, for silently converting... + case 'mysql': + case 'mysql4': + if (version_compare($db->mysql_version, '4.1.3', '>=')) + { + $convert->mysql_convert = true; + } + break; + + case 'mysqli': + $convert->mysql_convert = true; + break; + } + // Set up a user as well. We _should_ have enough of a database here at this point to do this // and it helps for any core code we call $user->session_begin(); @@ -889,24 +907,6 @@ class install_convert extends module $counting = -1; $batch_time = 0; - $convert->mysql_convert = false; - - switch ($db->sql_layer) - { - // Thanks MySQL, for silently converting... - case 'mysql': - case 'mysql4': - if (version_compare($db->mysql_version, '4.1.3', '>=')) - { - $convert->mysql_convert = true; - } - break; - - case 'mysqli': - $convert->mysql_convert = true; - break; - } - while (($counting === -1 || $counting >= $convert->batch_size) && still_on_time()) { $old_current_table = $current_table; @@ -1600,7 +1600,12 @@ class install_convert extends module { if (strpos($type, 'typecast') === 0) { - $value = settype($value, $execution); + if (!is_array($value)) + { + $value = array($value); + } + $value = $value[0]; + settype($value, $execution); } else if (strpos($type, 'function') === 0) { |
