1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/10748] Replace direct creations of tools();

PHPBB3-10748
This commit is contained in:
Joas Schilling
2015-01-24 12:06:45 +01:00
parent 4ea90ca44d
commit 37ae99c75d
19 changed files with 60 additions and 31 deletions

View File

@@ -1200,7 +1200,9 @@ class install_install extends module
->get_classes();
$sqlite_db = new \phpbb\db\driver\sqlite();
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $sqlite_db, new \phpbb\db\tools\tools($sqlite_db, true), $phpbb_root_path, $phpEx, $table_prefix);
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($sqlite_db, true);
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $sqlite_db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix);
$db_table_schema = $schema_generator->get_schema();
}
@@ -1212,7 +1214,8 @@ class install_install extends module
define('CONFIG_TABLE', $data['table_prefix'] . 'config');
}
$db_tools = new \phpbb\db\tools\tools($db);
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db);
foreach ($db_table_schema as $table_name => $table_data)
{
$db_tools->sql_create_table(