mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-16 22:51:23 +02:00
[feature/migrations] Use $this->db
PHPBB3-9737
This commit is contained in:
committed by
Nathan Guse
parent
2a7985c26f
commit
ae8edf7b0e
@@ -95,29 +95,29 @@ class phpbb_db_migration
|
|||||||
echo "<br />\n{$sql}\n<br />";
|
echo "<br />\n{$sql}\n<br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->sql_return_on_error(true);
|
$this->db->sql_return_on_error(true);
|
||||||
|
|
||||||
if ($sql === 'begin')
|
if ($sql === 'begin')
|
||||||
{
|
{
|
||||||
$result = $db->sql_transaction('begin');
|
$result = $this->db->sql_transaction('begin');
|
||||||
}
|
}
|
||||||
else if ($sql === 'commit')
|
else if ($sql === 'commit')
|
||||||
{
|
{
|
||||||
$result = $db->sql_transaction('commit');
|
$result = $this->db->sql_transaction('commit');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
if ($db->sql_error_triggered)
|
if ($this->db->sql_error_triggered)
|
||||||
{
|
{
|
||||||
$this->errors[] = array(
|
$this->errors[] = array(
|
||||||
'sql' => $db->sql_error_sql,
|
'sql' => $this->db->sql_error_sql,
|
||||||
'code' => $db->sql_error_returned,
|
'code' => $this->db->sql_error_returned,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->sql_return_on_error(false);
|
$this->db->sql_return_on_error(false);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user