|
From: Meik S. <acy...@ph...> - 2009-08-20 12:28:05
|
Author: acydburn
Date: Thu Aug 20 13:19:12 2009
New Revision: 10028
Log:
also populate forum_options on conversions
Modified:
branches/phpBB-3_0_0/phpBB/install/convertors/functions_phpbb20.php
Modified: branches/phpBB-3_0_0/phpBB/install/convertors/functions_phpbb20.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/install/convertors/functions_phpbb20.php (original)
--- branches/phpBB-3_0_0/phpBB/install/convertors/functions_phpbb20.php Thu Aug 20 13:19:12 2009
***************
*** 71,78 ****
$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
--- 71,78 ----
$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,232 ****
--- 227,233 ----
'prune_freq' => (int) null_to_zero($row['prune_freq']),
'forum_flags' => phpbb_forum_flags(),
+ 'forum_options' => 0,
// Default values
'forum_desc_bitfield' => '',
***************
*** 972,983 ****
{
// 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;
--- 973,984 ----
{
// 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,1235 ****
{
$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);
--- 1230,1236 ----
{
$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,1264 ****
// 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'];
--- 1259,1265 ----
// 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,1358 ****
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))
--- 1353,1359 ----
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,1443 ****
$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);
--- 1432,1444 ----
$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,1522 ****
function phpbb_get_avatar_height($user_avatar)
{
global $convert_row;
!
if (empty($convert_row['user_avatar_type']))
{
return 0;
--- 1517,1523 ----
function phpbb_get_avatar_height($user_avatar)
{
global $convert_row;
!
if (empty($convert_row['user_avatar_type']))
{
return 0;
***************
*** 1536,1542 ****
{
return 0;
}
!
return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']);
}
--- 1537,1543 ----
{
return 0;
}
!
return get_avatar_width($user_avatar, 'phpbb_avatar_type', $convert_row['user_avatar_type']);
}
***************
*** 1708,1714 ****
case 'mysql':
$map_dbms = 'mysql_40';
break;
!
case 'mysql4':
if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
{
--- 1709,1715 ----
case 'mysql':
$map_dbms = 'mysql_40';
break;
!
case 'mysql4':
if (version_compare($db->sql_server_info(true), '4.1.3', '>='))
{
***************
*** 1719,1734 ****
$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;
--- 1720,1735 ----
$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;
|