diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-01-24 12:06:45 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-07 14:41:39 +0100 |
commit | 37ae99c75d388221489aa1069078d92eca413741 (patch) | |
tree | c94d5cf5b816e7cfc5bf3e698f63b2b418629268 /phpBB/develop | |
parent | 4ea90ca44d6d274f1ff6e6e3b4821f9e8cd1e9da (diff) | |
download | forums-37ae99c75d388221489aa1069078d92eca413741.tar forums-37ae99c75d388221489aa1069078d92eca413741.tar.gz forums-37ae99c75d388221489aa1069078d92eca413741.tar.bz2 forums-37ae99c75d388221489aa1069078d92eca413741.tar.xz forums-37ae99c75d388221489aa1069078d92eca413741.zip |
[ticket/10748] Replace direct creations of tools();
PHPBB3-10748
Diffstat (limited to 'phpBB/develop')
-rw-r--r-- | phpBB/develop/create_schema_files.php | 5 | ||||
-rw-r--r-- | phpBB/develop/mysql_upgrader.php | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 5c5bfe6171..8dce97144d 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -49,7 +49,10 @@ $classes = $finder->core_path('phpbb/') ->get_classes(); $db = new \phpbb\db\driver\sqlite(); -$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix); +$factory = new \phpbb\db\tools\factory(); +$db_tools = $factory->get($db, true); + +$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix); $schema_data = $schema_generator->get_schema(); $fp = fopen($schema_path . 'schema.json', 'wb'); diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 51fbd75c10..543b520caa 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -67,7 +67,10 @@ $classes = $finder->core_path('phpbb/') ->directory('/db/migration/data') ->get_classes(); -$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, new \phpbb\db\tools\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix); +$factory = new \phpbb\db\tools\factory(); +$db_tools = $factory->get($db, true); + +$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix); $schema_data = $schema_generator->get_schema(); $dbms_type_map = \phpbb\db\tools\tools::get_dbms_type_map(); |