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/install | |
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/install')
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 4 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index f8a6954634..48cff426b8 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1926,7 +1926,9 @@ function phpbb_check_username_collisions() function phpbb_convert_timezone($timezone) { global $config, $db, $phpbb_root_path, $phpEx, $table_prefix; - $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools\tools($db), $phpbb_root_path, $phpEx, $table_prefix); + + $factory = new \phpbb\db\tools\factory(); + $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, $factory->get($db), $phpbb_root_path, $phpEx, $table_prefix); return $timezone_migration->convert_phpbb30_timezone($timezone, 0); } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 380f34bab6..e38c9c5bdf 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -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( |