diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-14 00:56:37 -0400 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-14 10:10:05 -0400 |
commit | 057d860d07fe829104aa938338830787415bc1c6 (patch) | |
tree | 01d82d5623b86201f6dfba268fcaccb347ed0c7c /phpBB | |
parent | 1e37d97909ccf52b08e2a809ea8a9365c824d8de (diff) | |
download | forums-057d860d07fe829104aa938338830787415bc1c6.tar forums-057d860d07fe829104aa938338830787415bc1c6.tar.gz forums-057d860d07fe829104aa938338830787415bc1c6.tar.bz2 forums-057d860d07fe829104aa938338830787415bc1c6.tar.xz forums-057d860d07fe829104aa938338830787415bc1c6.zip |
[ticket/11696] Rename db_tools.php so it can be autoloaded
PHPBB3-11696
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/config/services.yml | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 4 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 12 | ||||
-rw-r--r-- | phpBB/includes/db/tools.php (renamed from phpBB/includes/db/db_tools.php) | 0 | ||||
-rw-r--r-- | phpBB/includes/functions_install.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/search/fulltext_sphinx.php | 5 |
6 files changed, 2 insertions, 26 deletions
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 25fff79de3..c1579cfb57 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -126,7 +126,6 @@ services: - [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]] dbal.tools: - file: %core.root_path%includes/db/db_tools.%core.php_ext% class: phpbb_db_tools arguments: - @dbal.conn diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index ebcbd28a87..5d191b3d0f 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -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'); diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index ec7636f511..6843f25d72 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -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); diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/tools.php index 983cdc18ea..983cdc18ea 100644 --- a/phpBB/includes/db/db_tools.php +++ b/phpBB/includes/db/tools.php diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 8978e3fadd..bd0ffaaf00 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -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(); diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index 2f7b236c78..4f3f852664 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -135,11 +135,6 @@ class phpbb_search_fulltext_sphinx $this->db = $db; $this->auth = $auth; - if (!class_exists('phpbb_db_tools')) - { - require($this->phpbb_root_path . 'includes/db/db_tools.' . $this->php_ext); - } - // Initialize phpbb_db_tools object $this->db_tools = new phpbb_db_tools($this->db); |