1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-05 20:21:53 +02:00

[ticket/17543] Use class method to call db object instance where possible

PHPBB-17543
This commit is contained in:
rxu
2025-09-24 23:16:15 +07:00
parent 70c07d4302
commit b51f8bc6e9
13 changed files with 73 additions and 97 deletions

View File

@@ -38,10 +38,9 @@ class phpbb_functional_search_mysql_test extends phpbb_functional_search_base
// Try optimizing posts table after creating search index.
// Some versions of MariaDB might not return any results in the search
// until the table has been optimized or the index deleted and re-created.
$db = $this->get_db();
$db->sql_return_on_error(true);
$this->db->sql_return_on_error(true);
$sql = 'OPTIMIZE TABLE ' . POSTS_TABLE;
$db->sql_query($sql);
$db->sql_return_on_error(false);
$this->db->sql_query($sql);
$this->db->sql_return_on_error(false);
}
}