diff options
Diffstat (limited to 'phpBB/phpbb/di/container_builder.php')
| -rw-r--r-- | phpBB/phpbb/di/container_builder.php | 14 | 
1 files changed, 14 insertions, 0 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  			);  		}  | 
