1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2007-01-09 14:10:44 +00:00
parent 164fb66f44
commit 2b35b9d60d
15 changed files with 82 additions and 56 deletions

View File

@@ -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)
{