aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-07-14 00:56:37 -0400
committerJoas Schilling <nickvergessen@gmx.de>2013-07-14 10:10:05 -0400
commit057d860d07fe829104aa938338830787415bc1c6 (patch)
tree01d82d5623b86201f6dfba268fcaccb347ed0c7c
parent1e37d97909ccf52b08e2a809ea8a9365c824d8de (diff)
downloadforums-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
-rw-r--r--phpBB/config/services.yml1
-rw-r--r--phpBB/includes/acp/acp_database.php4
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php12
-rw-r--r--phpBB/includes/db/tools.php (renamed from phpBB/includes/db/db_tools.php)0
-rw-r--r--phpBB/includes/functions_install.php6
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php5
-rw-r--r--tests/dbal/auto_increment_test.php1
-rw-r--r--tests/dbal/db_tools_test.php1
-rw-r--r--tests/dbal/migrator_test.php2
-rw-r--r--tests/extension/metadata_manager_test.php2
-rw-r--r--tests/functional/extension_controller_test.php1
-rw-r--r--tests/functional/metadata_manager_test.php2
-rw-r--r--tests/notification/convert_test.php2
13 files changed, 2 insertions, 37 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);
diff --git a/tests/dbal/auto_increment_test.php b/tests/dbal/auto_increment_test.php
index e87fc1c6bd..077bfad933 100644
--- a/tests/dbal/auto_increment_test.php
+++ b/tests/dbal/auto_increment_test.php
@@ -8,7 +8,6 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
{
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index c20e46011f..7bdbc696e7 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -8,7 +8,6 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
class phpbb_dbal_db_tools_test extends phpbb_database_test_case
{
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index 07eb666e93..9e55e4dd35 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -8,8 +8,6 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
-
require_once dirname(__FILE__) . '/migration/dummy.php';
require_once dirname(__FILE__) . '/migration/unfulfillable.php';
require_once dirname(__FILE__) . '/migration/if.php';
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index bd88f396d9..e5bd29092e 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -7,8 +7,6 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
-
class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
{
protected $class_loader;
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index 9ddf1e3e5c..7d29f0000c 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -6,7 +6,6 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
/**
* @group functional
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php
index c55e7373ea..651c99a99d 100644
--- a/tests/functional/metadata_manager_test.php
+++ b/tests/functional/metadata_manager_test.php
@@ -7,8 +7,6 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
-
/**
* @group functional
*/
diff --git a/tests/notification/convert_test.php b/tests/notification/convert_test.php
index 4d00fa0a1e..c038020385 100644
--- a/tests/notification/convert_test.php
+++ b/tests/notification/convert_test.php
@@ -6,8 +6,6 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
require_once dirname(__FILE__) . '/../mock/sql_insert_buffer.php';
class phpbb_notification_convert_test extends phpbb_database_test_case