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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user