1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-19 07:41:08 +01:00
#7976


git-svn-id: file:///svn/phpbb/trunk@7021 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2007-02-20 13:57:52 +00:00
parent 66b18be324
commit af4c99690b
2 changed files with 11 additions and 11 deletions

View File

@ -165,12 +165,12 @@ if (!$get_info)
// Test to see if the attachment MOD is installed on the source forum
// If it is, we will convert this data as well
$db->sql_return_on_error(true);
$src_db->sql_return_on_error(true);
$sql = "SELECT config_value
FROM {$convert->src_table_prefix}attachments_config
WHERE config_name = 'upload_dir'";
$result = $db->sql_query($sql);
$result = $src_db->sql_query($sql);
if ($result && $row = $db->sql_fetchrow($result))
{
@ -193,15 +193,15 @@ if (!$get_info)
* Please use constants for this, prefixing them with MOD_
*/
$db->sql_return_on_error(false);
$src_db->sql_return_on_error(false);
// Now let us set a temporary config variable for user id incrementing
$sql = "SELECT user_id
FROM {$convert->src_table_prefix}users
WHERE user_id = 1";
$result = $db->sql_query($sql);
$user_id = (int) $db->sql_fetchfield('user_id');
$db->sql_freeresult($result);
$result = $src_db->sql_query($sql);
$user_id = (int) $src_db->sql_fetchfield('user_id');
$src_db->sql_freeresult($result);
// If there is a user id 1, we need to increment user ids. :/
if ($user_id === 1)
@ -333,7 +333,7 @@ if (!$get_info)
array('is_orphan', 0, ''),
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('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
array('download_count', 'attachments_desc.download_count', ''),
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('extension', 'attachments_desc.extension', ''),

View File

@ -89,7 +89,7 @@ function phpbb_insert_forums()
{
$sql_ary = array(
'forum_id' => $max_forum_id,
'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_encoding($row['cat_title'], false), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'],
'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_default_encoding($row['cat_title']), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'],
'parent_id' => 0,
'forum_parents' => '',
'forum_desc' => '',
@ -200,10 +200,10 @@ function phpbb_insert_forums()
// Define the new forums sql ary
$sql_ary = array(
'forum_id' => (int) $row['forum_id'],
'forum_name' => htmlspecialchars(phpbb_set_encoding($row['forum_name'], false), ENT_COMPAT, 'UTF-8'),
'forum_name' => htmlspecialchars(phpbb_set_default_encoding($row['forum_name']), ENT_COMPAT, 'UTF-8'),
'parent_id' => $cats_added[$row['cat_id']],
'forum_parents' => '',
'forum_desc' => htmlspecialchars(phpbb_set_encoding($row['forum_desc'], false), ENT_COMPAT, 'UTF-8'),
'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'),
'forum_type' => FORUM_POST,
'forum_status' => is_item_locked($row['forum_status']),
'enable_prune' => $row['prune_enable'],
@ -1047,7 +1047,7 @@ function phpbb_convert_group_name($group_name)
return 'phpBB2 - ' . $group_name;
}
return phpbb_set_encoding($group_name, false);
return phpbb_set_default_encoding($group_name);
}
/**