diff options
Diffstat (limited to 'phpBB/install/convertors/functions_phpbb20.php')
| -rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 51 | 
1 files changed, 27 insertions, 24 deletions
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$');  | 
