1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

Merge remote-tracking branch 'github-nicofuma/ticket/12446' into develop-ascraeus

* github-nicofuma/ticket/12446:
  [ticket/12446] Unnecessary db connect inphpbb_bootstrap_enabled_exts
This commit is contained in:
Nils Adermann
2014-07-04 21:08:20 +02:00
55 changed files with 764 additions and 143 deletions

View File

@@ -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))

View File

@@ -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

View File

@@ -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);
}
}

View File

@@ -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))

View File

@@ -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()

View File

@@ -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()

View File

@@ -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(),
);
}
}