mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-18 22:41:28 +02:00
[ticket/12446] Unnecessary db connect inphpbb_bootstrap_enabled_exts
PHPBB3-12446
This commit is contained in:
@@ -37,7 +37,7 @@ class local_url_bbcode extends \phpbb\db\migration\migration
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BBCODES_TABLE . '
|
||||
WHERE bbcode_match ' . $this->db->sql_like_expression($this->db->any_char . 'LOCAL_URL' . $this->db->any_char);
|
||||
WHERE bbcode_match ' . $this->db->sql_like_expression($this->db->get_any_char() . 'LOCAL_URL' . $this->db->get_any_char());
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
|
@@ -36,7 +36,7 @@ class release_3_0_4 extends \phpbb\db\migration\migration
|
||||
|
||||
public function rename_log_delete_topic()
|
||||
{
|
||||
if ($this->db->sql_layer == 'oracle')
|
||||
if ($this->db->get_sql_layer() == 'oracle')
|
||||
{
|
||||
// log_operation is CLOB - but we can change this later
|
||||
$sql = 'UPDATE ' . $this->table_prefix . "log
|
||||
|
@@ -76,7 +76,7 @@ class release_3_0_7_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
// Delete all text-templates from the template_data
|
||||
$sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
|
||||
WHERE template_filename ' . $this->db->sql_like_expression($this->db->any_char . '.txt');
|
||||
WHERE template_filename ' . $this->db->sql_like_expression($this->db->get_any_char() . '.txt');
|
||||
$this->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ class release_3_0_9_rc1 extends \phpbb\db\migration\migration
|
||||
// Update file extension group names to use language strings, again.
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . EXTENSION_GROUPS_TABLE . '
|
||||
WHERE group_name ' . $this->db->sql_like_expression('EXT_GROUP_' . $this->db->any_char);
|
||||
WHERE group_name ' . $this->db->sql_like_expression('EXT_GROUP_' . $this->db->get_any_char());
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
|
@@ -18,7 +18,7 @@ class mysql_fulltext_drop extends \phpbb\db\migration\migration
|
||||
public function effectively_installed()
|
||||
{
|
||||
// This migration is irrelevant for all non-MySQL DBMSes.
|
||||
return strpos($this->db->sql_layer, 'mysql') === false;
|
||||
return strpos($this->db->get_sql_layer(), 'mysql') === false;
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
|
@@ -18,7 +18,7 @@ class postgres_fulltext_drop extends \phpbb\db\migration\migration
|
||||
public function effectively_installed()
|
||||
{
|
||||
// This migration is irrelevant for all non-PostgreSQL DBMSes.
|
||||
return strpos($this->db->sql_layer, 'postgres') === false;
|
||||
return strpos($this->db->get_sql_layer(), 'postgres') === false;
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
|
@@ -160,11 +160,11 @@ abstract class migration
|
||||
else
|
||||
{
|
||||
$result = $this->db->sql_query($sql);
|
||||
if ($this->db->sql_error_triggered)
|
||||
if ($this->db->get_sql_error_triggered())
|
||||
{
|
||||
$this->errors[] = array(
|
||||
'sql' => $this->db->sql_error_sql,
|
||||
'code' => $this->db->sql_error_returned,
|
||||
'sql' => $this->db->get_sql_error_sql(),
|
||||
'code' => $this->db->get_sql_error_returned(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user