mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-13 03:54:57 +01:00
- ok... first of all, let the forum names and descriptions being recoded correctly...
- fixed the php notices for a non-existant poster id. They were related to user signature conversion - adjusted the topic_poster id; this should solve wrong user assignments for topic poster - adjusted private message author; normally here some users should have encountered wrong ids. - adjusted the batch sizes to support the usual 2.0.x target base - the old values were used for really huge conversions. :) - commented out meta refresh for the time being - we will add a setting for this, some may want to sit in front, some may want to go away while converting (most likely when they did a test run before) git-svn-id: file:///svn/phpbb/trunk@6860 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b94a240d2f
commit
55b5e71411
@ -517,7 +517,7 @@ if (!$get_info)
|
||||
|
||||
array('poll_option_id', 'vote_results.vote_option_id', ''),
|
||||
array('topic_id', 'vote_desc.topic_id', ''),
|
||||
array('', 'topics.topic_poster AS poster_id', ''),
|
||||
array('', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
|
||||
array('poll_option_text', 'vote_results.vote_option_text', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
|
||||
array('poll_option_total', 'vote_results.vote_result', ''),
|
||||
|
||||
@ -605,7 +605,7 @@ if (!$get_info)
|
||||
|
||||
array('msg_id', 'privmsgs.privmsgs_id', ''),
|
||||
array('root_level', 0, ''),
|
||||
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
|
||||
array('author_id', 'privmsgs.privmsgs_from_userid AS poster_id', 'phpbb_user_id'),
|
||||
array('icon_id', 0, ''),
|
||||
array('author_ip', 'privmsgs.privmsgs_ip', 'decode_ip'),
|
||||
array('message_time', 'privmsgs.privmsgs_date', ''),
|
||||
@ -624,7 +624,6 @@ if (!$get_info)
|
||||
array('bbcode_uid', 'privmsgs.privmsgs_date AS post_time', 'make_uid'),
|
||||
array('message_text', 'privmsgs_text.privmsgs_text', 'phpbb_prepare_message'),
|
||||
array('', 'privmsgs_text.privmsgs_bbcode_uid AS old_bbcode_uid', ''),
|
||||
array('', 'privmsgs.privmsgs_from_userid AS poster_id', ''),
|
||||
array('bbcode_bitfield', '', 'get_bbcode_bitfield'),
|
||||
array('to_address', 'privmsgs.privmsgs_to_userid', 'phpbb_privmsgs_to_userid'),
|
||||
|
||||
@ -787,6 +786,7 @@ if (!$get_info)
|
||||
),
|
||||
|
||||
array('user_id', 'users.user_id', 'phpbb_user_id'),
|
||||
array('', 'users.user_id AS poster_id', 'phpbb_user_id'),
|
||||
array('user_type', 'users.user_active', 'set_user_type'),
|
||||
array('group_id', 'users.user_level', 'phpbb_set_primary_group'),
|
||||
array('user_regdate', 'users.user_regdate', ''),
|
||||
|
@ -63,8 +63,19 @@ function phpbb_insert_forums()
|
||||
$sql = 'SELECT cat_id, cat_title
|
||||
FROM ' . $convert->src_table_prefix . 'categories
|
||||
ORDER BY cat_order';
|
||||
|
||||
if ($convert->mysql_convert)
|
||||
{
|
||||
$db->sql_query("SET NAMES 'binary'");
|
||||
}
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($convert->mysql_convert)
|
||||
{
|
||||
$db->sql_query("SET NAMES 'utf8'");
|
||||
}
|
||||
|
||||
$cats_added = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@ -151,8 +162,19 @@ function phpbb_insert_forums()
|
||||
LEFT JOIN ' . $convert->src_table_prefix . 'forum_prune fp ON f.forum_id = fp.forum_id
|
||||
GROUP BY f.forum_id
|
||||
ORDER BY f.cat_id, f.forum_order';
|
||||
|
||||
if ($convert->mysql_convert)
|
||||
{
|
||||
$db->sql_query("SET NAMES 'binary'");
|
||||
}
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($convert->mysql_convert)
|
||||
{
|
||||
$db->sql_query("SET NAMES 'utf8'");
|
||||
}
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// Some might have forums here with an id not being "possible"...
|
||||
|
@ -46,9 +46,14 @@ class convert
|
||||
var $fulltext_search;
|
||||
|
||||
// Batch size, can be adjusted by the conversion file
|
||||
var $batch_size = 6000;
|
||||
// For big boards a value of 6000 seems to be optimal
|
||||
var $batch_size = 2000;
|
||||
// Number of rows to be inserted at once (extended insert) if supported
|
||||
var $num_wait_rows = 30;
|
||||
// For installations having enough memory a value of 60 may be good.
|
||||
var $num_wait_rows = 20;
|
||||
|
||||
// Mysqls internal recoding engine messing up with our (better) functions? We at least support more encodings than mysql so should use it in favor.
|
||||
var $mysql_convert = false;
|
||||
|
||||
var $p_master;
|
||||
|
||||
@ -606,9 +611,16 @@ class install_convert extends module
|
||||
$this->p_master->error($user->lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
if (!is_writeable($phpbb_root_path . $local_path))
|
||||
if (!$local_path || !is_writeable($phpbb_root_path . $local_path))
|
||||
{
|
||||
$bad_folders[] = $local_path;
|
||||
if (!$local_path)
|
||||
{
|
||||
$bad_folders[] = sprintf($user->lang['CONFIG_PHPBB_EMPTY'], $folder);
|
||||
}
|
||||
else
|
||||
{
|
||||
$bad_folders[] = $local_path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -877,7 +889,7 @@ class install_convert extends module
|
||||
$counting = -1;
|
||||
$batch_time = 0;
|
||||
|
||||
$mysql_convert = false;
|
||||
$convert->mysql_convert = false;
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
@ -886,12 +898,12 @@ class install_convert extends module
|
||||
case 'mysql4':
|
||||
if (version_compare($db->mysql_version, '4.1.3', '>='))
|
||||
{
|
||||
$mysql_convert = true;
|
||||
$convert->mysql_convert = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mysqli':
|
||||
$mysql_convert = true;
|
||||
$convert->mysql_convert = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -917,7 +929,7 @@ class install_convert extends module
|
||||
$mtime = explode(' ', microtime());
|
||||
$batch_time = $mtime[0] + $mtime[1];
|
||||
|
||||
if ($mysql_convert)
|
||||
if ($convert->mysql_convert)
|
||||
{
|
||||
$db->sql_query("SET NAMES 'binary'");
|
||||
}
|
||||
@ -925,7 +937,7 @@ class install_convert extends module
|
||||
// Take skip rows into account and only fetch batch_size amount of rows
|
||||
$___result = $db->sql_query_limit($sql, $convert->batch_size, $skip_rows);
|
||||
|
||||
if ($mysql_convert)
|
||||
if ($convert->mysql_convert)
|
||||
{
|
||||
$db->sql_query("SET NAMES 'utf8'");
|
||||
}
|
||||
@ -1677,7 +1689,7 @@ class install_convert extends module
|
||||
{
|
||||
if (!defined('DEBUG_EXTRA'))
|
||||
{
|
||||
meta_refresh(5, $url);
|
||||
// meta_refresh(5, $url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,7 @@ $lang = array_merge($lang, array(
|
||||
'CONFIG_CONVERT' => 'Converting the configuration',
|
||||
'CONFIG_FILE_UNABLE_WRITE' => 'It was not possible to write the configuration file. Alternative methods for this file to be created are presented below',
|
||||
'CONFIG_FILE_WRITTEN' => 'The configuration file has been written, you may now proceed to the next step of the installation',
|
||||
'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for "%s" is empty.'
|
||||
'CONFIG_RETRY' => 'Retry',
|
||||
'CONTACT_EMAIL_CONFIRM' => 'Confirm contact email',
|
||||
'CONTINUE_CONVERT' => 'Continue conversion',
|
||||
|
Loading…
x
Reference in New Issue
Block a user