diff options
Diffstat (limited to 'phpBB/install/convertors')
-rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 7 | ||||
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 51 |
2 files changed, 30 insertions, 28 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 3a5e58cabd..9949c972d9 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.6', + 'phpbb_version' => '3.2.0-a1', 'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, @@ -233,11 +233,11 @@ if (!$get_info) $user_id = (int) $src_db->sql_fetchfield('max_user_id'); $src_db->sql_freeresult($result); - set_config('increment_user_id', ($user_id + 1), true); + $config->set('increment_user_id', ($user_id + 1), false); } else { - set_config('increment_user_id', 0, true); + $config->set('increment_user_id', 0, false); } // Overwrite maximum avatar width/height @@ -963,7 +963,6 @@ if (!$get_info) array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), - array('pf_phpbb_wlm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_yahoo', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_aol', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_website', 'users.user_website', 'validate_website'), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 817c007274..aa2c59f28c 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -514,12 +514,12 @@ function phpbb_user_id($user_id) // If there is a user id 1, we need to increment user ids. :/ if ($id === 1) { - set_config('increment_user_id', ($max_id + 1), true); + $config->set('increment_user_id', ($max_id + 1), false); $config['increment_user_id'] = $max_id + 1; } else { - set_config('increment_user_id', 0, true); + $config->set('increment_user_id', 0, false); $config['increment_user_id'] = 0; } } @@ -661,7 +661,7 @@ function phpbb_convert_authentication($mode) 'auth_delete' => 'f_delete', 'auth_pollcreate' => 'f_poll', 'auth_vote' => 'f_vote', - 'auth_announce' => 'f_announce', + 'auth_announce' => array('f_announce', 'f_announce_global'), 'auth_sticky' => 'f_sticky', 'auth_attachments' => array('f_attach', 'f_download'), 'auth_download' => 'f_download', @@ -990,7 +990,7 @@ function phpbb_convert_authentication($mode) // 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_announce' => array('f_announce', 'f_announce_global'), 'auth_sticky' => 'f_sticky' ); @@ -1682,29 +1682,29 @@ function phpbb_import_attach_config() } $src_db->sql_freeresult($result); - set_config('allow_attachments', 1); + $config->set('allow_attachments', 1); // old attachment mod? Must be very old if this entry do not exist... if (!empty($attach_config['display_order'])) { - set_config('display_order', $attach_config['display_order']); - } - set_config('max_filesize', $attach_config['max_filesize']); - set_config('max_filesize_pm', $attach_config['max_filesize_pm']); - set_config('attachment_quota', $attach_config['attachment_quota']); - set_config('max_attachments', $attach_config['max_attachments']); - set_config('max_attachments_pm', $attach_config['max_attachments_pm']); - set_config('allow_pm_attach', $attach_config['allow_pm_attach']); - - set_config('img_display_inlined', $attach_config['img_display_inlined']); - set_config('img_max_width', $attach_config['img_max_width']); - set_config('img_max_height', $attach_config['img_max_height']); - set_config('img_link_width', $attach_config['img_link_width']); - set_config('img_link_height', $attach_config['img_link_height']); - set_config('img_create_thumbnail', $attach_config['img_create_thumbnail']); - set_config('img_max_thumb_width', 400); - set_config('img_min_thumb_filesize', $attach_config['img_min_thumb_filesize']); - set_config('img_imagick', $attach_config['img_imagick']); + $config->set('display_order', $attach_config['display_order']); + } + $config->set('max_filesize', $attach_config['max_filesize']); + $config->set('max_filesize_pm', $attach_config['max_filesize_pm']); + $config->set('attachment_quota', $attach_config['attachment_quota']); + $config->set('max_attachments', $attach_config['max_attachments']); + $config->set('max_attachments_pm', $attach_config['max_attachments_pm']); + $config->set('allow_pm_attach', $attach_config['allow_pm_attach']); + + $config->set('img_display_inlined', $attach_config['img_display_inlined']); + $config->set('img_max_width', $attach_config['img_max_width']); + $config->set('img_max_height', $attach_config['img_max_height']); + $config->set('img_link_width', $attach_config['img_link_width']); + $config->set('img_link_height', $attach_config['img_link_height']); + $config->set('img_create_thumbnail', $attach_config['img_create_thumbnail']); + $config->set('img_max_thumb_width', 400); + $config->set('img_min_thumb_filesize', $attach_config['img_min_thumb_filesize']); + $config->set('img_imagick', $attach_config['img_imagick']); } /** @@ -1926,7 +1926,9 @@ function phpbb_check_username_collisions() function phpbb_convert_timezone($timezone) { global $config, $db, $phpbb_root_path, $phpEx, $table_prefix; - $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools($db), $phpbb_root_path, $phpEx, $table_prefix); + + $factory = new \phpbb\db\tools\factory(); + $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, $factory->get($db), $phpbb_root_path, $phpEx, $table_prefix); return $timezone_migration->convert_phpbb30_timezone($timezone, 0); } @@ -1974,6 +1976,7 @@ function phpbb_convert_password_hash($hash) { global $phpbb_container; + /* @var $manager \phpbb\passwords\manager */ $manager = $phpbb_container->get('passwords.manager'); $hash = $manager->hash($hash, '$H$'); |