aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/helper/container_factory.php
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-07-24 09:20:50 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-10-17 23:05:57 +0200
commit8f5a0ad6f73e7b7757b02c827436384c96069b5a (patch)
tree87a16ddaa2f645d62728f0b4543199e43995bfeb /phpBB/phpbb/install/helper/container_factory.php
parentf1047ac854baba4d1015cd9a555a523b3860f2c9 (diff)
downloadforums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.gz
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.bz2
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.xz
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.zip
[ticket/14039] Revamp updater
PHPBB3-14039
Diffstat (limited to 'phpBB/phpbb/install/helper/container_factory.php')
-rw-r--r--phpBB/phpbb/install/helper/container_factory.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php
index dc0eef6485..fd42d53c00 100644
--- a/phpBB/phpbb/install/helper/container_factory.php
+++ b/phpBB/phpbb/install/helper/container_factory.php
@@ -134,8 +134,13 @@ class container_factory
$this->request->enable_super_globals();
}
- $this->container = $phpbb_container = $phpbb_container_builder
+ $other_config_path = $this->phpbb_root_path . 'install/update/new/config';
+ $config_path = (is_dir($other_config_path)) ? $other_config_path : $this->phpbb_root_path . 'config';
+
+ $this->container = $phpbb_container_builder
+ ->with_environment('production')
->with_config($phpbb_config_php_file)
+ ->with_config_path($config_path)
->without_cache()
->without_compiled_container()
->get_container();
@@ -145,11 +150,17 @@ class container_factory
$this->container->register('request')->setSynthetic(true);
$this->container->set('request', $this->request);
- // Replace cache service, as config gets cached, and we don't want that
- $this->container->register('cache.driver')->setSynthetic(true);
- $this->container->set('cache.driver', new dummy());
+ // Replace cache service, as config gets cached, and we don't want that when we are installing
+ if (!is_dir($other_config_path))
+ {
+ $this->container->register('cache.driver')->setSynthetic(true);
+ $this->container->set('cache.driver', new dummy());
+ }
+
$this->container->compile();
+ $phpbb_container = $this->container;
+
// Restore super globals to previous state
if ($disable_super_globals)
{