also populate forum_options on conversions

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10028 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-08-20 12:19:12 +00:00
parent 3c2b339636
commit 9666983c69

View file

@ -71,8 +71,8 @@ function phpbb_insert_forums()
$result = $src_db->sql_query($sql);
$prune_enabled = (int) $src_db->sql_fetchfield('config_value');
$src_db->sql_freeresult($result);
// Insert categories
$sql = 'SELECT cat_id, cat_title
FROM ' . $convert->src_table_prefix . 'categories
@ -227,6 +227,7 @@ function phpbb_insert_forums()
'prune_freq' => (int) null_to_zero($row['prune_freq']),
'forum_flags' => phpbb_forum_flags(),
'forum_options' => 0,
// Default values
'forum_desc_bitfield' => '',
@ -972,12 +973,12 @@ function phpbb_convert_authentication($mode)
{
// And now the moderators
// We make sure that they have at least standard access to the forums they moderate in addition to the moderating permissions
$mod_post_map = array(
'auth_announce' => 'f_announce',
'auth_sticky' => 'f_sticky'
);
foreach ($user_access as $forum_id => $access_map)
{
$forum_id = (int) $forum_id;
@ -1229,7 +1230,7 @@ function phpbb_prepare_message($message)
{
$message = preg_replace('/\[quote="(.*?)"\]/s', '[quote="\1"]', $message);
$message = preg_replace('/\[quote=\\\"(.*?)\\\"\]/s', '[quote="\1"]', $message);
// let's hope that this solves more problems than it causes. Deal with escaped quotes.
$message = str_replace('\"', '"', $message);
$message = str_replace('\"', '"', $message);
@ -1258,7 +1259,7 @@ function phpbb_prepare_message($message)
// parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
$message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies);
if (sizeof($message_parser->warn_msg))
{
$msg_id = isset($convert->row['post_id']) ? $convert->row['post_id'] : $convert->row['privmsgs_id'];
@ -1352,7 +1353,7 @@ function phpbb_copy_thumbnails()
global $db, $convert, $user, $config, $cache, $phpbb_root_path;
$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
if ($handle = @opendir($src_path))
{
while ($entry = readdir($handle))
@ -1431,13 +1432,13 @@ function phpbb_attachment_forum_perms($forum_permissions)
$pos--;
continue;
}
$forum_auth = substr($forum_permissions, $pos, $auth_len);
$forum_id = base64_unpack($forum_auth);
$forum_ids[] = (int) $forum_id;
}
if (sizeof($forum_ids))
{
return attachment_forum_perms($forum_ids);
@ -1516,7 +1517,7 @@ function phpbb_import_avatar($user_avatar)
function phpbb_get_avatar_height($user_avatar)
{
global $convert_row;
if (empty($convert_row['user_avatar_type']))
{
return 0;
@ -1536,7 +1537,7 @@ function phpbb_get_avatar_width($user_avatar)
{
return 0;
}
return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']);
}
@ -1708,7 +1709,7 @@ function phpbb_create_userconv_table()
case 'mysql':
$map_dbms = 'mysql_40';
break;
case 'mysql4':
if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
{
@ -1719,16 +1720,16 @@ function phpbb_create_userconv_table()
$map_dbms = 'mysql_40';
}
break;
case 'mysqli':
$map_dbms = 'mysql_41';
break;
case 'mssql':
case 'mssql_odbc':
$map_dbms = 'mssql';
break;
default:
$map_dbms = $db->sql_layer;
break;