aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-10-23 21:13:25 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-10-23 21:13:25 +0200
commit6dd462060999f81baa67c20f536f86e6bb6198ce (patch)
treee39a55872c156f1044fa9ace349c548219476d94 /phpBB
parentd612041cd19d5bea7d08f80a2d952123699aa30e (diff)
downloadforums-6dd462060999f81baa67c20f536f86e6bb6198ce.tar
forums-6dd462060999f81baa67c20f536f86e6bb6198ce.tar.gz
forums-6dd462060999f81baa67c20f536f86e6bb6198ce.tar.bz2
forums-6dd462060999f81baa67c20f536f86e6bb6198ce.tar.xz
forums-6dd462060999f81baa67c20f536f86e6bb6198ce.zip
[ticket/11031] Fix container construction and missing objects
PHPBB3-11031
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/install/install_convert.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 4d3e1d3d4a..1c7e2dca76 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -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}&amp;sub=final&amp;language=$language";