mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/11696] Rename db_tools.php so it can be autoloaded
PHPBB3-11696
This commit is contained in:
parent
1e37d97909
commit
057d860d07
13 changed files with 2 additions and 37 deletions
|
@ -126,7 +126,6 @@ services:
|
||||||
- [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
|
- [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
|
||||||
|
|
||||||
dbal.tools:
|
dbal.tools:
|
||||||
file: %core.root_path%includes/db/db_tools.%core.php_ext%
|
|
||||||
class: phpbb_db_tools
|
class: phpbb_db_tools
|
||||||
arguments:
|
arguments:
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
|
|
|
@ -28,10 +28,6 @@ class acp_database
|
||||||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
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);
|
$this->db_tools = new phpbb_db_tools($db);
|
||||||
|
|
||||||
$user->add_lang('acp/database');
|
$user->add_lang('acp/database');
|
||||||
|
|
|
@ -110,12 +110,8 @@ class phpbb_captcha_qa
|
||||||
*/
|
*/
|
||||||
static public function is_installed()
|
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);
|
$db_tool = new phpbb_db_tools($db);
|
||||||
|
|
||||||
return $db_tool->sql_table_exists(CAPTCHA_QUESTIONS_TABLE);
|
return $db_tool->sql_table_exists(CAPTCHA_QUESTIONS_TABLE);
|
||||||
|
@ -297,12 +293,8 @@ class phpbb_captcha_qa
|
||||||
*/
|
*/
|
||||||
function install()
|
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);
|
$db_tool = new phpbb_db_tools($db);
|
||||||
|
|
||||||
$tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE, CAPTCHA_QA_CONFIRM_TABLE);
|
$tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE, CAPTCHA_QA_CONFIRM_TABLE);
|
||||||
|
|
|
@ -184,12 +184,6 @@ function dbms_select($default = '', $only_20x_options = false)
|
||||||
*/
|
*/
|
||||||
function get_tables(&$db)
|
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);
|
$db_tools = new phpbb_db_tools($db);
|
||||||
|
|
||||||
return $db_tools->sql_list_tables();
|
return $db_tools->sql_list_tables();
|
||||||
|
|
|
@ -135,11 +135,6 @@ class phpbb_search_fulltext_sphinx
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->auth = $auth;
|
$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
|
// Initialize phpbb_db_tools object
|
||||||
$this->db_tools = new phpbb_db_tools($this->db);
|
$this->db_tools = new phpbb_db_tools($this->db);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
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
|
class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
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
|
class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
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/dummy.php';
|
||||||
require_once dirname(__FILE__) . '/migration/unfulfillable.php';
|
require_once dirname(__FILE__) . '/migration/unfulfillable.php';
|
||||||
require_once dirname(__FILE__) . '/migration/if.php';
|
require_once dirname(__FILE__) . '/migration/if.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
|
class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
protected $class_loader;
|
protected $class_loader;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
* @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
|
* @group functional
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group functional
|
* @group functional
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
* @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';
|
require_once dirname(__FILE__) . '/../mock/sql_insert_buffer.php';
|
||||||
|
|
||||||
class phpbb_notification_convert_test extends phpbb_database_test_case
|
class phpbb_notification_convert_test extends phpbb_database_test_case
|
||||||
|
|
Loading…
Add table
Reference in a new issue