aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/db_tools.php2
-rw-r--r--phpBB/includes/db/driver/driver.php (renamed from phpBB/includes/db/dbal.php)17
-rw-r--r--phpBB/includes/db/driver/firebird.php (renamed from phpBB/includes/db/firebird.php)4
-rw-r--r--phpBB/includes/db/driver/mssql.php (renamed from phpBB/includes/db/mssql.php)4
-rw-r--r--phpBB/includes/db/driver/mssql_odbc.php (renamed from phpBB/includes/db/mssql_odbc.php)4
-rw-r--r--phpBB/includes/db/driver/mssqlnative.php (renamed from phpBB/includes/db/mssqlnative.php)4
-rw-r--r--phpBB/includes/db/driver/mysql.php (renamed from phpBB/includes/db/mysql.php)4
-rw-r--r--phpBB/includes/db/driver/mysqli.php (renamed from phpBB/includes/db/mysqli.php)4
-rw-r--r--phpBB/includes/db/driver/oracle.php (renamed from phpBB/includes/db/oracle.php)4
-rw-r--r--phpBB/includes/db/driver/postgres.php (renamed from phpBB/includes/db/postgres.php)9
-rw-r--r--phpBB/includes/db/driver/sqlite.php (renamed from phpBB/includes/db/sqlite.php)4
11 files changed, 16 insertions, 44 deletions
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 6df3aac9ce..2bb016cebd 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -300,7 +300,7 @@ class phpbb_db_tools
/**
* Constructor. Set DB Object and set {@link $return_statements return_statements}.
*
- * @param phpbb_dbal $db DBAL object
+ * @param phpbb_db_driver $db Database connection
* @param bool $return_statements True if only statements should be returned and no SQL being executed
*/
function phpbb_db_tools(&$db, $return_statements = false)
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/driver/driver.php
index ef1dd7d14d..25daa7243d 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/driver/driver.php
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
* Database Abstraction Layer
* @package dbal
*/
-class dbal
+class phpbb_db_driver
{
var $db_connect_id;
var $query_result;
@@ -72,17 +72,17 @@ class dbal
/**
* Constructor
*/
- function dbal()
+ function __construct()
{
$this->num_queries = array(
- 'cached' => 0,
- 'normal' => 0,
- 'total' => 0,
+ 'cached' => 0,
+ 'normal' => 0,
+ 'total' => 0,
);
// Fill default sql layer based on the class being called.
// This can be changed by the specified layer itself later if needed.
- $this->sql_layer = substr(get_class($this), 5);
+ $this->sql_layer = substr(get_class($this), strlen('phpbb_db_driver_'));
// Do not change this please! This variable is used to easy the use of it - and is hardcoded.
$this->any_char = chr(0) . '%';
@@ -1042,8 +1042,3 @@ class dbal
return $rows_total;
}
}
-
-/**
-* This variable holds the class name to use later
-*/
-$sql_db = (!empty($dbms)) ? 'dbal_' . basename($dbms) : 'dbal';
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/driver/firebird.php
index 5728eb901c..a55175c345 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/driver/firebird.php
@@ -15,14 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* Firebird/Interbase Database Abstraction Layer
* Minimum Requirement is Firebird 2.1
* @package dbal
*/
-class dbal_firebird extends dbal
+class phpbb_db_driver_firebird extends phpbb_db_driver
{
var $last_query_text = '';
var $service_handle = false;
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/driver/mssql.php
index 235c48d3f0..ac957e7698 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/driver/mssql.php
@@ -15,14 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* MSSQL Database Abstraction Layer
* Minimum Requirement is MSSQL 2000+
* @package dbal
*/
-class dbal_mssql extends dbal
+class phpbb_db_driver_mssql extends phpbb_db_driver
{
var $connect_error = '';
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/driver/mssql_odbc.php
index 2194de4a5e..13e74e66d4 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/driver/mssql_odbc.php
@@ -15,8 +15,6 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* Unified ODBC functions
* Unified ODBC functions support any database having ODBC driver, for example Adabas D, IBM DB2, iODBC, Solid, Sybase SQL Anywhere...
@@ -28,7 +26,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
*
* @package dbal
*/
-class dbal_mssql_odbc extends dbal
+class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
{
var $last_query_text = '';
var $connect_error = '';
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/driver/mssqlnative.php
index 4a969828e7..4b1639aba2 100644
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/driver/mssqlnative.php
@@ -19,8 +19,6 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* Prior to version 1.1 the SQL Server Native PHP driver didn't support sqlsrv_num_rows, or cursor based seeking so we recall all rows into an array
* and maintain our own cursor index into that array.
@@ -193,7 +191,7 @@ class result_mssqlnative
/**
* @package dbal
*/
-class dbal_mssqlnative extends dbal
+class phpbb_db_driver_mssqlnative extends phpbb_db_driver
{
var $m_insert_id = NULL;
var $last_query_text = '';
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/driver/mysql.php
index dcdeec0401..6fc6fab483 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/driver/mysql.php
@@ -15,8 +15,6 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* MySQL4 Database Abstraction Layer
* Compatible with:
@@ -26,7 +24,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
* MySQL 5.0+
* @package dbal
*/
-class dbal_mysql extends dbal
+class phpbb_db_driver_mysql extends phpbb_db_driver
{
var $multi_insert = true;
var $connect_error = '';
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/driver/mysqli.php
index 5713b1992c..be28a95715 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/driver/mysqli.php
@@ -15,15 +15,13 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* MySQLi Database Abstraction Layer
* mysqli-extension has to be compiled with:
* MySQL 4.1+ or MySQL 5.0+
* @package dbal
*/
-class dbal_mysqli extends dbal
+class phpbb_db_driver_mysqli extends phpbb_db_driver
{
var $multi_insert = true;
var $connect_error = '';
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/driver/oracle.php
index 4a2b107865..6263ea8414 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/driver/oracle.php
@@ -15,13 +15,11 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* Oracle Database Abstraction Layer
* @package dbal
*/
-class dbal_oracle extends dbal
+class phpbb_db_driver_oracle extends phpbb_db_driver
{
var $last_query_text = '';
var $connect_error = '';
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/driver/postgres.php
index 8dfbfc3b60..147ecd04d9 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/driver/postgres.php
@@ -15,19 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
-if (!class_exists('phpbb_error_collector'))
-{
- include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
-}
-
/**
* PostgreSQL Database Abstraction Layer
* Minimum Requirement is Version 7.3+
* @package dbal
*/
-class dbal_postgres extends dbal
+class phpbb_db_driver_postgres extends phpbb_db_driver
{
var $last_query_text = '';
var $connect_error = '';
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/driver/sqlite.php
index 06e368d586..6b9cc64d89 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/driver/sqlite.php
@@ -15,14 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
/**
* Sqlite Database Abstraction Layer
* Minimum Requirement: 2.8.2+
* @package dbal
*/
-class dbal_sqlite extends dbal
+class phpbb_db_driver_sqlite extends phpbb_db_driver
{
var $connect_error = '';