1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-26 21:15:21 +02:00

[ticket/11031] Fix container construction and missing objects

PHPBB3-11031
This commit is contained in:
Joas Schilling
2013-10-23 21:13:25 +02:00
parent d612041cd1
commit 6dd4620609

View File

@ -90,13 +90,21 @@ class install_convert extends module
function main($mode, $sub)
{
global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix;
global $convert;
global $convert, $request, $phpbb_container;
$this->tpl_name = 'install_convert';
$this->mode = $mode;
$convert = new convert($this->p_master);
// Enable super globals to prevent issues with the new \phpbb\request\request object
$request->enable_super_globals();
// Create a normal container now
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
// Create cache
$cache = $phpbb_container->get('cache');
switch ($sub)
{
case 'intro':
@ -418,6 +426,7 @@ class install_convert extends module
{
$error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix);
}
$src_dbms = phpbb_convert_30_dbms_to_31($src_dbms);
// Check table prefix
if (!sizeof($error))
@ -1537,7 +1546,7 @@ class install_convert extends module
function finish_conversion()
{
global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
global $cache, $auth;
global $cache, $auth, $phpbb_container, $phpbb_log;
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
WHERE config_name = 'convert_progress'
@ -1550,6 +1559,7 @@ class install_convert extends module
phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
$phpbb_log = $phpbb_container->get('log');
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
$url = $this->p_master->module_url . "?mode={$this->mode}&sub=final&language=$language";