1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +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

@@ -113,9 +113,9 @@ class qa
*/
public function is_installed()
{
global $db;
global $phpbb_container;
$db_tool = new \phpbb\db\tools\tools($db);
$db_tool = $phpbb_container->get('dbal.tools');
return $db_tool->sql_table_exists($this->table_captcha_questions);
}
@@ -306,11 +306,9 @@ class qa
*/
function install()
{
global $db;
global $phpbb_container;
$db_tool = new \phpbb\db\tools\tools($db);
$tables = array($this->table_captcha_questions, $this->table_captcha_answers, $this->table_qa_confirm);
$db_tool = $phpbb_container->get('dbal.tools');
$schemas = array(
$this->table_captcha_questions => array (
@@ -352,7 +350,7 @@ class qa
),
);
foreach($schemas as $table => $schema)
foreach ($schemas as $table => $schema)
{
if (!$db_tool->sql_table_exists($table))
{