1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11696] Rename db_tools.php so it can be autoloaded

PHPBB3-11696
This commit is contained in:
Joas Schilling
2013-07-14 00:56:37 -04:00
parent 1e37d97909
commit 057d860d07
13 changed files with 2 additions and 37 deletions

View File

@@ -28,10 +28,6 @@ class acp_database
global $cache, $db, $user, $auth, $template, $table_prefix;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
if (!class_exists('phpbb_db_tools'))
{
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
}
$this->db_tools = new phpbb_db_tools($db);
$user->add_lang('acp/database');

View File

@@ -110,12 +110,8 @@ class phpbb_captcha_qa
*/
static public function is_installed()
{
global $db, $phpbb_root_path, $phpEx;
global $db;
if (!class_exists('phpbb_db_tools', false))
{
include("$phpbb_root_path/includes/db/db_tools.$phpEx");
}
$db_tool = new phpbb_db_tools($db);
return $db_tool->sql_table_exists(CAPTCHA_QUESTIONS_TABLE);
@@ -297,12 +293,8 @@ class phpbb_captcha_qa
*/
function install()
{
global $db, $phpbb_root_path, $phpEx;
global $db;
if (!class_exists('phpbb_db_tools'))
{
include("$phpbb_root_path/includes/db/db_tools.$phpEx");
}
$db_tool = new phpbb_db_tools($db);
$tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE, CAPTCHA_QA_CONFIRM_TABLE);

View File

@@ -184,12 +184,6 @@ function dbms_select($default = '', $only_20x_options = false)
*/
function get_tables(&$db)
{
if (!class_exists('phpbb_db_tools'))
{
global $phpbb_root_path, $phpEx;
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
}
$db_tools = new phpbb_db_tools($db);
return $db_tools->sql_list_tables();