diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-12-28 18:15:17 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2017-01-03 21:29:30 +0100 |
| commit | 14fd750b087c7c9e31f9701bb08ced08db964d12 (patch) | |
| tree | 5e7c54b21c7a6c4b8493dff4e68af7a03c35e566 /phpBB/phpbb/di/container_builder.php | |
| parent | bc96a9f1f67df4719f66896590288eb03f6ca12d (diff) | |
| download | forums-14fd750b087c7c9e31f9701bb08ced08db964d12.tar forums-14fd750b087c7c9e31f9701bb08ced08db964d12.tar.gz forums-14fd750b087c7c9e31f9701bb08ced08db964d12.tar.bz2 forums-14fd750b087c7c9e31f9701bb08ced08db964d12.tar.xz forums-14fd750b087c7c9e31f9701bb08ced08db964d12.zip | |
[ticket/14957] Do not cache database config entries
PHPBB3-14957
Diffstat (limited to 'phpBB/phpbb/di/container_builder.php')
| -rw-r--r-- | phpBB/phpbb/di/container_builder.php | 13 |
1 files changed, 13 insertions, 0 deletions
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) { @@ -304,6 +305,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. * * @return \phpbb\db\driver\driver_interface @@ -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 ); } |
