From 14fd750b087c7c9e31f9701bb08ced08db964d12 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 28 Dec 2016 18:15:17 +0100 Subject: [ticket/14957] Do not cache database config entries PHPBB3-14957 --- phpBB/phpbb/di/container_builder.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'phpBB/phpbb/di/container_builder.php') diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php index a214356ac3..9801b817d6 100644 --- a/phpBB/phpbb/di/container_builder.php +++ b/phpBB/phpbb/di/container_builder.php @@ -185,6 +185,7 @@ class container_builder } $this->container->set('config.php', $this->config_php_file); + $this->inject_dbal_driver(); if ($this->compile_container) { @@ -303,6 +304,17 @@ class container_builder } } + /** + * Inject the dbal connection driver into container + */ + protected function inject_dbal_driver() + { + if (!empty($this->config_php_file->get_all())) + { + $this->container->set('dbal.conn.driver', $this->get_dbal_connection()); + } + } + /** * Get DB connection. * @@ -320,6 +332,7 @@ class container_builder $this->config_php_file->get('dbpasswd'), $this->config_php_file->get('dbname'), $this->config_php_file->get('dbport'), + false, defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK ); } -- cgit v1.2.1