diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-01-04 17:29:50 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-01-04 17:29:50 +0100 |
commit | f2c4bf176d7aaa18f143894643851a73cfd7df06 (patch) | |
tree | f9af1811ed87b3fe1031df94b4a7e0560031712d /phpBB/phpbb | |
parent | bc96a9f1f67df4719f66896590288eb03f6ca12d (diff) | |
parent | ff411ee81bc12574138577a5bb4b0cbc9004b00e (diff) | |
download | forums-f2c4bf176d7aaa18f143894643851a73cfd7df06.tar forums-f2c4bf176d7aaa18f143894643851a73cfd7df06.tar.gz forums-f2c4bf176d7aaa18f143894643851a73cfd7df06.tar.bz2 forums-f2c4bf176d7aaa18f143894643851a73cfd7df06.tar.xz forums-f2c4bf176d7aaa18f143894643851a73cfd7df06.zip |
Merge pull request #4609 from marc1706/ticket/14957
[ticket/14957] Do not cache database config entries
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/di/container_builder.php | 14 | ||||
-rw-r--r-- | phpBB/phpbb/di/extension/config.php | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php index a214356ac3..5f3aa685bf 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,18 @@ class container_builder } /** + * Inject the dbal connection driver into container + */ + protected function inject_dbal_driver() + { + $config_data = $this->config_php_file->get_all(); + if (!empty($config_data)) + { + $this->container->set('dbal.conn.driver', $this->get_dbal_connection()); + } + } + + /** * Get DB connection. * * @return \phpbb\db\driver\driver_interface @@ -320,6 +333,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 ); } diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php index 7984a783df..8c9de48823 100644 --- a/phpBB/phpbb/di/extension/config.php +++ b/phpBB/phpbb/di/extension/config.php @@ -43,12 +43,6 @@ class config extends Extension 'core.adm_relative_path' => $this->config_php->get('phpbb_adm_relative_path') ? $this->config_php->get('phpbb_adm_relative_path') : 'adm/', 'core.table_prefix' => $this->config_php->get('table_prefix'), 'cache.driver.class' => $this->convert_30_acm_type($this->config_php->get('acm_type')), - 'dbal.driver.class' => $this->config_php->convert_30_dbms_to_31($this->config_php->get('dbms')), - 'dbal.dbhost' => $this->config_php->get('dbhost'), - 'dbal.dbuser' => $this->config_php->get('dbuser'), - 'dbal.dbpasswd' => $this->config_php->get('dbpasswd'), - 'dbal.dbname' => $this->config_php->get('dbname'), - 'dbal.dbport' => $this->config_php->get('dbport'), 'dbal.new_link' => defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK, ); $parameter_bag = $container->getParameterBag(); |