diff options
Diffstat (limited to 'phpBB/install/install_update.php')
-rw-r--r-- | phpBB/install/install_update.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 0ec6897607..d9ba2e7fe9 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -55,6 +55,8 @@ class install_update extends module var $update_to_version; + protected $filesystem; + // Set to false var $test_update = false; @@ -74,12 +76,16 @@ class install_update extends module $request->enable_super_globals(); // Create a normal container now - $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); - $phpbb_container_builder->set_dump_container(false); - $phpbb_container_builder->set_use_extensions(false); + $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); + $phpbb_container = $phpbb_container_builder + ->with_config($phpbb_config_php_file) + ->without_cache() + ->without_extensions() + ; + if (file_exists($phpbb_root_path . 'install/update/new/config')) { - $phpbb_container_builder->set_config_path($phpbb_root_path . 'install/update/new/config'); + $phpbb_container_builder->with_config_path($phpbb_root_path . 'install/update/new/config'); } $phpbb_container = $phpbb_container_builder->get_container(); @@ -87,6 +93,8 @@ class install_update extends module /* @var $cache \phpbb\cache\service */ $cache = $phpbb_container->get('cache'); + $this->filesystem = $phpbb_container->get('filesystem'); + $this->tpl_name = 'install_update'; $this->page_title = 'UPDATE_INSTALLATION'; @@ -114,7 +122,7 @@ class install_update extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); // Force template recompile $config['load_tplcompile'] = 1; @@ -961,7 +969,7 @@ class install_update extends module // Now init the connection if ($update_mode == 'download') { - if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/')) + if ($this->filesystem->is_writable($phpbb_root_path . 'store/')) { trigger_error(sprintf('The directory ā%sā is not writable.', $phpbb_root_path . 'store/'), E_USER_ERROR); } |