1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +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

@@ -26,10 +26,10 @@ class acp_database
function main($id, $mode)
{
global $cache, $db, $user, $auth, $template, $table_prefix, $request;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
global $cache, $db, $user, $template, $table_prefix, $request;
global $phpbb_root_path, $phpbb_container, $phpbb_log;
$this->db_tools = new \phpbb\db\tools\tools($db);
$this->db_tools = $phpbb_container->get('dbal.tools');
$user->add_lang('acp/database');

View File

@@ -188,7 +188,8 @@ function dbms_select($default = '', $only_20x_options = false)
*/
function get_tables(&$db)
{
$db_tools = new \phpbb\db\tools\tools($db);
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db);
return $db_tools->sql_list_tables();
}