diff options
Diffstat (limited to 'phpBB/phpbb/db/driver')
-rw-r--r-- | phpBB/phpbb/db/driver/driver.php | 13 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/driver_interface.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/firebird.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssql.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssql_base.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssql_odbc.php | 12 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mssqlnative.php | 16 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mysql.php | 32 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mysql_base.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/mysqli.php | 14 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/oracle.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/postgres.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/sqlite.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/sqlite3.php | 11 |
14 files changed, 124 insertions, 61 deletions
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 85d160c80e..3d4aa95606 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,7 +15,6 @@ namespace phpbb\db\driver; /** * Database Abstraction Layer -* @package dbal */ abstract class driver implements driver_interface { @@ -814,7 +817,7 @@ abstract class driver implements driver_interface </div> </div> <div id="page-footer"> - Powered by <a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group + Powered by <a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited </div> </div> </body> diff --git a/phpBB/phpbb/db/driver/driver_interface.php b/phpBB/phpbb/db/driver/driver_interface.php index a9051616c9..7f7d341e2d 100644 --- a/phpBB/phpbb/db/driver/driver_interface.php +++ b/phpBB/phpbb/db/driver/driver_interface.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ diff --git a/phpBB/phpbb/db/driver/firebird.php b/phpBB/phpbb/db/driver/firebird.php index a4967c7ffe..c7b185a577 100644 --- a/phpBB/phpbb/db/driver/firebird.php +++ b/phpBB/phpbb/db/driver/firebird.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -12,7 +16,6 @@ namespace phpbb\db\driver; /** * Firebird/Interbase Database Abstraction Layer * Minimum Requirement is Firebird 2.1 -* @package dbal */ class firebird extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php index 588cd7a7e8..2e56638617 100644 --- a/phpBB/phpbb/db/driver/mssql.php +++ b/phpBB/phpbb/db/driver/mssql.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -12,7 +16,6 @@ namespace phpbb\db\driver; /** * MSSQL Database Abstraction Layer * Minimum Requirement is MSSQL 2000+ -* @package dbal */ class mssql extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/mssql_base.php b/phpBB/phpbb/db/driver/mssql_base.php index 1e3fb8235a..e7101903b8 100644 --- a/phpBB/phpbb/db/driver/mssql_base.php +++ b/phpBB/phpbb/db/driver/mssql_base.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,7 +15,6 @@ namespace phpbb\db\driver; /** * MSSQL Database Base Abstraction Layer -* @package dbal */ abstract class mssql_base extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php index 34b913dc8a..de90d878e7 100644 --- a/phpBB/phpbb/db/driver/mssql_odbc.php +++ b/phpBB/phpbb/db/driver/mssql_odbc.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -17,8 +21,6 @@ namespace phpbb\db\driver; * @note number of bytes returned for returning data depends on odbc.defaultlrl php.ini setting. * If it is limited to 4K for example only 4K of data is returned max, resulting in incomplete theme data for example. * @note odbc.defaultbinmode may affect UTF8 characters -* -* @package dbal */ class mssql_odbc extends \phpbb\db\driver\mssql_base { diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index b449de2ae4..9639bfa988 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -1,10 +1,17 @@ <?php /** * -* @package dbal -* @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. * +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +/** * This is the MS SQL Server Native database abstraction layer. * PHP mssql native driver required. * @author Chris Pucci @@ -13,9 +20,6 @@ namespace phpbb\db\driver; -/** -* @package dbal -*/ class mssqlnative extends \phpbb\db\driver\mssql_base { var $m_insert_id = null; diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php index 1a4fd364df..569bd4f10a 100644 --- a/phpBB/phpbb/db/driver/mysql.php +++ b/phpBB/phpbb/db/driver/mysql.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -16,7 +20,6 @@ namespace phpbb\db\driver; * MySQL 4.0+ * MySQL 4.1+ * MySQL 5.0+ -* @package dbal */ class mysql extends \phpbb\db\driver\mysql_base { @@ -207,7 +210,26 @@ class mysql extends \phpbb\db\driver\mysql_base */ function sql_affectedrows() { - return ($this->db_connect_id) ? @mysql_affected_rows($this->db_connect_id) : false; + if ($this->db_connect_id) + { + // We always want the number of matched rows + // instead of changed rows, when running an update. + // So when mysql_info() returns the number of matched rows + // we return that one instead of mysql_affected_rows() + $mysql_info = @mysql_info($this->db_connect_id); + if ($mysql_info !== false) + { + $match = array(); + preg_match('#^Rows matched: (\d)+ Changed: (\d)+ Warnings: (\d)+$#', $mysql_info, $match); + if (isset($match[1])) + { + return $match[1]; + } + } + + return @mysql_affected_rows($this->db_connect_id); + } + return false; } /** diff --git a/phpBB/phpbb/db/driver/mysql_base.php b/phpBB/phpbb/db/driver/mysql_base.php index d0f6a9e8fa..e7c9b63f20 100644 --- a/phpBB/phpbb/db/driver/mysql_base.php +++ b/phpBB/phpbb/db/driver/mysql_base.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,7 +15,6 @@ namespace phpbb\db\driver; /** * Abstract MySQL Database Base Abstraction Layer -* @package dbal */ abstract class mysql_base extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php index 6814599b24..58361ff0f8 100644 --- a/phpBB/phpbb/db/driver/mysqli.php +++ b/phpBB/phpbb/db/driver/mysqli.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -13,7 +17,6 @@ namespace phpbb\db\driver; * MySQLi Database Abstraction Layer * mysqli-extension has to be compiled with: * MySQL 4.1+ or MySQL 5.0+ -* @package dbal */ class mysqli extends \phpbb\db\driver\mysql_base { @@ -57,7 +60,8 @@ class mysqli extends \phpbb\db\driver\mysql_base } } - $this->db_connect_id = @mysqli_connect($this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket); + $this->db_connect_id = mysqli_init(); + @mysqli_real_connect($this->db_connect_id, $this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket, MYSQLI_CLIENT_FOUND_ROWS); if ($this->db_connect_id && $this->dbname != '') { diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php index 8a304b5042..bfc5373e35 100644 --- a/phpBB/phpbb/db/driver/oracle.php +++ b/phpBB/phpbb/db/driver/oracle.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,7 +15,6 @@ namespace phpbb\db\driver; /** * Oracle Database Abstraction Layer -* @package dbal */ class oracle extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php index 9e091f0a5d..a4aa9497ed 100644 --- a/phpBB/phpbb/db/driver/postgres.php +++ b/phpBB/phpbb/db/driver/postgres.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -12,7 +16,6 @@ namespace phpbb\db\driver; /** * PostgreSQL Database Abstraction Layer * Minimum Requirement is Version 7.3+ -* @package dbal */ class postgres extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php index 86a585f4eb..f4c5e240fc 100644 --- a/phpBB/phpbb/db/driver/sqlite.php +++ b/phpBB/phpbb/db/driver/sqlite.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -12,7 +16,6 @@ namespace phpbb\db\driver; /** * Sqlite Database Abstraction Layer * Minimum Requirement: 2.8.2+ -* @package dbal */ class sqlite extends \phpbb\db\driver\driver { diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php index 971b3e55d3..2c6bf99497 100644 --- a/phpBB/phpbb/db/driver/sqlite3.php +++ b/phpBB/phpbb/db/driver/sqlite3.php @@ -1,9 +1,13 @@ <?php /** * -* @package dbal -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -12,7 +16,6 @@ namespace phpbb\db\driver; /** * SQLite3 Database Abstraction Layer * Minimum Requirement: 3.6.15+ -* @package dbal */ class sqlite3 extends \phpbb\db\driver\driver { |