mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
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:
parent
3c2b339636
commit
9666983c69
1 changed files with 16 additions and 15 deletions
|
@ -71,8 +71,8 @@ function phpbb_insert_forums()
|
||||||
$result = $src_db->sql_query($sql);
|
$result = $src_db->sql_query($sql);
|
||||||
$prune_enabled = (int) $src_db->sql_fetchfield('config_value');
|
$prune_enabled = (int) $src_db->sql_fetchfield('config_value');
|
||||||
$src_db->sql_freeresult($result);
|
$src_db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
||||||
// Insert categories
|
// Insert categories
|
||||||
$sql = 'SELECT cat_id, cat_title
|
$sql = 'SELECT cat_id, cat_title
|
||||||
FROM ' . $convert->src_table_prefix . 'categories
|
FROM ' . $convert->src_table_prefix . 'categories
|
||||||
|
@ -227,6 +227,7 @@ function phpbb_insert_forums()
|
||||||
'prune_freq' => (int) null_to_zero($row['prune_freq']),
|
'prune_freq' => (int) null_to_zero($row['prune_freq']),
|
||||||
|
|
||||||
'forum_flags' => phpbb_forum_flags(),
|
'forum_flags' => phpbb_forum_flags(),
|
||||||
|
'forum_options' => 0,
|
||||||
|
|
||||||
// Default values
|
// Default values
|
||||||
'forum_desc_bitfield' => '',
|
'forum_desc_bitfield' => '',
|
||||||
|
@ -972,12 +973,12 @@ function phpbb_convert_authentication($mode)
|
||||||
{
|
{
|
||||||
// And now the moderators
|
// 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
|
// 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(
|
$mod_post_map = array(
|
||||||
'auth_announce' => 'f_announce',
|
'auth_announce' => 'f_announce',
|
||||||
'auth_sticky' => 'f_sticky'
|
'auth_sticky' => 'f_sticky'
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($user_access as $forum_id => $access_map)
|
foreach ($user_access as $forum_id => $access_map)
|
||||||
{
|
{
|
||||||
$forum_id = (int) $forum_id;
|
$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);
|
||||||
$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.
|
// let's hope that this solves more problems than it causes. Deal with escaped quotes.
|
||||||
$message = str_replace('\"', '"', $message);
|
$message = str_replace('\"', '"', $message);
|
||||||
$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')
|
// 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);
|
$message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies);
|
||||||
|
|
||||||
if (sizeof($message_parser->warn_msg))
|
if (sizeof($message_parser->warn_msg))
|
||||||
{
|
{
|
||||||
$msg_id = isset($convert->row['post_id']) ? $convert->row['post_id'] : $convert->row['privmsgs_id'];
|
$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;
|
global $db, $convert, $user, $config, $cache, $phpbb_root_path;
|
||||||
|
|
||||||
$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
|
$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
|
||||||
|
|
||||||
if ($handle = @opendir($src_path))
|
if ($handle = @opendir($src_path))
|
||||||
{
|
{
|
||||||
while ($entry = readdir($handle))
|
while ($entry = readdir($handle))
|
||||||
|
@ -1431,13 +1432,13 @@ function phpbb_attachment_forum_perms($forum_permissions)
|
||||||
$pos--;
|
$pos--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$forum_auth = substr($forum_permissions, $pos, $auth_len);
|
$forum_auth = substr($forum_permissions, $pos, $auth_len);
|
||||||
$forum_id = base64_unpack($forum_auth);
|
$forum_id = base64_unpack($forum_auth);
|
||||||
|
|
||||||
$forum_ids[] = (int) $forum_id;
|
$forum_ids[] = (int) $forum_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($forum_ids))
|
if (sizeof($forum_ids))
|
||||||
{
|
{
|
||||||
return attachment_forum_perms($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)
|
function phpbb_get_avatar_height($user_avatar)
|
||||||
{
|
{
|
||||||
global $convert_row;
|
global $convert_row;
|
||||||
|
|
||||||
if (empty($convert_row['user_avatar_type']))
|
if (empty($convert_row['user_avatar_type']))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1536,7 +1537,7 @@ function phpbb_get_avatar_width($user_avatar)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']);
|
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':
|
case 'mysql':
|
||||||
$map_dbms = 'mysql_40';
|
$map_dbms = 'mysql_40';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'mysql4':
|
case 'mysql4':
|
||||||
if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
|
if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
|
||||||
{
|
{
|
||||||
|
@ -1719,16 +1720,16 @@ function phpbb_create_userconv_table()
|
||||||
$map_dbms = 'mysql_40';
|
$map_dbms = 'mysql_40';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'mysqli':
|
case 'mysqli':
|
||||||
$map_dbms = 'mysql_41';
|
$map_dbms = 'mysql_41';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'mssql':
|
case 'mssql':
|
||||||
case 'mssql_odbc':
|
case 'mssql_odbc':
|
||||||
$map_dbms = 'mssql';
|
$map_dbms = 'mssql';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$map_dbms = $db->sql_layer;
|
$map_dbms = $db->sql_layer;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue