From 05e8d9ee095ca4ea1039092fc75e93f888e60397 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 24 Nov 2008 19:23:23 +0000 Subject: Ha- ndle checking for duplicate usernames in chunks (Bug #17285 - Patch by A_Jelly_Doughnut)t) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9113 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/convertors/convert_phpbb20.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'phpBB/install/convertors/convert_phpbb20.php') diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index f413e2555a..da9bea3c05 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -229,6 +229,9 @@ if (!$get_info) @define('DEFAULT_AVATAR_X_CUSTOM', get_config_value('avatar_max_width')); @define('DEFAULT_AVATAR_Y_CUSTOM', get_config_value('avatar_max_height')); + // additional table used only during conversion + @define('USERCONV_TABLE', $table_prefix . 'userconv'); + /** * Description on how to use the convertor framework. * @@ -316,7 +319,7 @@ if (!$get_info) // username_clean in phpBB3 which is not possible, so we'll give the admin a list // of user ids and usernames and let him deicde what he wants to do with them 'execute_first' => ' - phpbb_check_username_collisions(); + phpbb_create_userconv_table(); import_avatar_gallery(); if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config(); phpbb_insert_forums(); @@ -339,6 +342,14 @@ if (!$get_info) '), 'schema' => array( + array( + 'target' => USERCONV_TABLE, + 'query_first' => array('target', $convert->truncate_statement . USERCONV_TABLE), + + + array('user_id', 'users.user_id', ''), + array('username_clean', 'users.username', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_clean_string')), + ), array( 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '', @@ -419,6 +430,7 @@ if (!$get_info) array( 'target' => BANLIST_TABLE, + 'execute_first' => 'phpbb_check_username_collisions();', 'query_first' => array('target', $convert->truncate_statement . BANLIST_TABLE), array('ban_ip', 'banlist.ban_ip', 'decode_ban_ip'), -- cgit v1.2.1