diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-07 18:53:15 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-07 18:53:15 +0000 |
| commit | 6f20a8742505e04b4e35457e087ed4dbf4ef5b39 (patch) | |
| tree | dc5cc385c3099eb7b872e90dc53422e3a6019248 /phpBB/install/convertors/convert_phpbb20.php | |
| parent | 0ac5a3bdbee285adcd4011d28f4a2872efdb1873 (diff) | |
| download | forums-6f20a8742505e04b4e35457e087ed4dbf4ef5b39.tar forums-6f20a8742505e04b4e35457e087ed4dbf4ef5b39.tar.gz forums-6f20a8742505e04b4e35457e087ed4dbf4ef5b39.tar.bz2 forums-6f20a8742505e04b4e35457e087ed4dbf4ef5b39.tar.xz forums-6f20a8742505e04b4e35457e087ed4dbf4ef5b39.zip | |
ok, let's recode other text fields too...
git-svn-id: file:///svn/phpbb/trunk@6858 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/convertors/convert_phpbb20.php')
| -rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index a30930ed5b..c506b46f8d 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -321,11 +321,11 @@ if (!$get_info) array('topic_id', 'posts.topic_id', ''), array('in_message', 0, ''), array('is_orphan', 0, ''), - array('poster_id', 'attachments.user_id_1', 'phpbb_user_id'), + array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'), array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'), array('real_filename', 'attachments_desc.real_filename', ''), array('download_count', 'attachments_desc.download_count', ''), - array('attach_comment', 'attachments_desc.comment', 'utf8_htmlspecialchars'), + array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('extension', 'attachments_desc.extension', ''), array('mimetype', 'attachments_desc.mimetype', ''), array('filesize', 'attachments_desc.filesize', ''), @@ -345,11 +345,11 @@ if (!$get_info) array('topic_id', 0, ''), array('in_message', 1, ''), array('is_orphan', 0, ''), - array('poster_id', 'attachments.user_id_1', 'phpbb_user_id'), + array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'), array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'), array('real_filename', 'attachments_desc.real_filename', ''), array('download_count', 'attachments_desc.download_count', ''), - array('attach_comment', 'attachments_desc.comment', 'utf8_htmlspecialchars'), + array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('extension', 'attachments_desc.extension', ''), array('mimetype', 'attachments_desc.mimetype', ''), array('filesize', 'attachments_desc.filesize', ''), @@ -374,7 +374,7 @@ if (!$get_info) 'query_first' => (defined('MOD_ATTACHMENT')) ? $convert->truncate_statement . EXTENSION_GROUPS_TABLE : '', array('group_id', 'extension_groups.group_id', ''), - array('group_name', 'extension_groups.group_name', 'utf8_htmlspecialchars'), + array('group_name', 'extension_groups.group_name', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('cat_id', 'extension_groups.cat_id', 'phpbb_attachment_category'), array('allow_group', 'extension_groups.allow_group', ''), array('download_mode', 1, ''), @@ -407,7 +407,7 @@ if (!$get_info) 'target' => DISALLOW_TABLE, 'query_first' => $convert->truncate_statement . DISALLOW_TABLE, - array('disallow_username', 'disallow.disallow_username', ''), + array('disallow_username', 'disallow.disallow_username', 'phpbb_set_encoding'), ), array( @@ -415,7 +415,7 @@ if (!$get_info) 'query_first' => $convert->truncate_statement . RANKS_TABLE, array('rank_id', 'ranks.rank_id', ''), - array('rank_title', 'ranks.rank_title', 'utf8_htmlspecialchars'), + array('rank_title', 'ranks.rank_title', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('rank_min', 'ranks.rank_min', array('typecast' => 'int', 'execute' => '{RESULT} = ({VALUE}[0] < 0) ? 0 : {VALUE}[0];')), array('rank_special', 'ranks.rank_special', ''), array('rank_image', 'ranks.rank_image', 'import_rank'), @@ -429,9 +429,9 @@ if (!$get_info) array('topic_id', 'topics.topic_id', ''), array('forum_id', 'topics.forum_id', ''), array('icon_id', 0, ''), - array('topic_poster', 'topics.topic_poster', 'phpbb_user_id'), + array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'), array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''), - array('topic_title', 'topics.topic_title', ''), + array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'), array('topic_time', 'topics.topic_time', ''), array('topic_views', 'topics.topic_views', ''), array('topic_replies', 'topics.topic_replies', ''), @@ -442,7 +442,7 @@ if (!$get_info) array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'), array('topic_first_post_id', 'topics.topic_first_post_id', ''), - array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'utf8_htmlspecialchars')), + array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')), array('poll_start', 'vote_desc.vote_start', 'null_to_zero'), array('poll_length', 'vote_desc.vote_length', 'null_to_zero'), array('poll_max_options', 1, ''), @@ -459,9 +459,9 @@ if (!$get_info) array('topic_id', 'topics.topic_id', ''), array('forum_id', 'topics.forum_id', ''), array('icon_id', 0, ''), - array('topic_poster', 'topics.topic_poster', 'phpbb_user_id'), + array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'), array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''), - array('topic_title', 'topics.topic_title', ''), + array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'), array('topic_time', 'topics.topic_time', ''), array('topic_views', 'topics.topic_views', ''), array('topic_replies', 'topics.topic_replies', ''), @@ -472,7 +472,7 @@ if (!$get_info) array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'), array('topic_first_post_id', 'topics.topic_first_post_id', ''), - array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'utf8_htmlspecialchars')), + array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')), array('poll_start', 'vote_desc.vote_start', 'null_to_zero'), array('poll_length', 'vote_desc.vote_length', 'null_to_zero'), array('poll_max_options', 1, ''), @@ -497,8 +497,8 @@ if (!$get_info) 'query_first' => $convert->truncate_statement . SMILIES_TABLE, array('smiley_id', 'smilies.smilies_id', ''), - array('code', 'smilies.code', ''), - array('emotion', 'smilies.emoticon', ''), + array('code', 'smilies.code', 'phpbb_set_encoding'), + array('emotion', 'smilies.emoticon', 'phpbb_set_encoding'), array('smiley_url', 'smilies.smile_url', 'import_smiley'), array('smiley_width', 'smilies.smile_url', 'get_smiley_width'), array('smiley_height', 'smilies.smile_url', 'get_smiley_height'), @@ -517,10 +517,12 @@ if (!$get_info) array('poll_option_id', 'vote_results.vote_option_id', ''), array('topic_id', 'vote_desc.topic_id', ''), - array('poll_option_text', 'vote_results.vote_option_text', 'utf8_htmlspecialchars'), + array('', 'topics.topic_poster AS poster_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', ''), 'where' => 'vote_results.vote_id = vote_desc.vote_id', + 'left_join' => 'vote_desc LEFT JOIN topics ON topics.topic_id = vote_desc.topic_id', ), array( @@ -542,8 +544,8 @@ if (!$get_info) 'query_first' => $convert->truncate_statement . WORDS_TABLE, array('word_id', 'words.word_id', ''), - array('word', 'words.word', ''), - array('replacement', 'words.replacement', ''), + array('word', 'words.word', 'phpbb_set_encoding'), + array('replacement', 'words.replacement', 'phpbb_set_encoding'), ), array( @@ -566,8 +568,8 @@ if (!$get_info) array('enable_smilies', 'posts.enable_smilies', ''), array('enable_sig', 'posts.enable_sig', ''), array('enable_magic_url', 1, ''), - array('post_username', 'posts.post_username', ''), - array('post_subject', 'posts_text.post_subject', ''), + array('post_username', 'posts.post_username', 'phpbb_set_encoding'), + array('post_subject', 'posts_text.post_subject', 'phpbb_set_encoding'), array('post_attachment', ((defined('MOD_ATTACHMENT')) ? 'posts.post_attachment' : 0), ''), array('post_edit_time', 'posts.post_edit_time', array('typecast' => 'int')), array('post_edit_count', 'posts.post_edit_count', ''), @@ -612,7 +614,7 @@ if (!$get_info) array('enable_smilies', 'privmsgs.privmsgs_enable_smilies AS enable_smilies', ''), array('enable_magic_url', 1, ''), array('enable_sig', 'privmsgs.privmsgs_attach_sig', ''), - array('message_subject', 'privmsgs.privmsgs_subject', 'utf8_htmlspecialchars'), + array('message_subject', 'privmsgs.privmsgs_subject', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('message_attachment', ((defined('MOD_ATTACHMENT')) ? 'privmsgs.privmsgs_attachment' : 0), ''), array('message_edit_reason', '', ''), array('message_edit_user', 0, ''), @@ -744,8 +746,8 @@ if (!$get_info) array('group_id', 'groups.group_id', ''), array('group_type', 'groups.group_type', 'phpbb_convert_group_type'), array('group_display', 0, ''), - array('group_name', 'groups.group_name', 'phpbb_convert_group_name'), - array('group_desc', 'groups.group_description', ''), + array('group_name', 'groups.group_name', 'phpbb_convert_group_name'), // phpbb_set_encoding called in phpbb_convert_group_name + array('group_desc', 'groups.group_description', 'phpbb_set_encoding'), 'where' => 'groups.group_single_user = 0', ), @@ -788,8 +790,8 @@ if (!$get_info) 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', ''), - array('username', 'users.username', ''), - array('username_clean', 'users.username', 'utf8_clean_string'), + array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang + array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')), array('user_password', 'users.user_password', ''), array('user_pass_convert', 1, ''), array('user_posts', 'users.user_posts', ''), @@ -798,20 +800,21 @@ if (!$get_info) array('user_birthday', ((defined('MOD_BIRTHDAY')) ? 'users.user_birthday' : ''), 'phpbb_get_birthday'), array('user_lastvisit', 'users.user_lastvisit', ''), array('user_lang', $config['default_lang'], ''), + array('', 'users.user_lang', ''), array('user_timezone', 'users.user_timezone', ''), array('user_dateformat', 'users.user_dateformat', ''), array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_time', '', 'phpbb_inactive_time'), - array('user_interests', 'users.user_interests', 'utf8_htmlspecialchars'), - array('user_occ', 'users.user_occ', 'utf8_htmlspecialchars'), + array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), + array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('user_website', 'users.user_website', 'validate_website'), array('user_jabber', '', ''), array('user_msnm', 'users.user_msnm', ''), array('user_yim', 'users.user_yim', ''), array('user_aim', 'users.user_aim', ''), array('user_icq', 'users.user_icq', ''), - array('user_from', 'users.user_from', 'utf8_htmlspecialchars'), + array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')), array('user_rank', 'users.user_rank', ''), array('user_permissions', '', ''), |
