1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/10205] Account for potentially missing extensions in dbal.

PHPBB3-10205
This commit is contained in:
Oleg Pudeyev
2011-03-09 21:50:45 -05:00
parent e64c5117b9
commit 025a95ea90
5 changed files with 93 additions and 4 deletions

View File

@@ -27,12 +27,19 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
class dbal_mysqli extends dbal
{
var $multi_insert = true;
var $connect_error = '';
/**
* Connect to server
*/
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false)
{
if (!function_exists('mysqli_connect'))
{
$this->connect_error = 'mysqli_connect function does not exist, is mysqli extension installed?';
return $this->sql_error('');
}
// Mysqli extension supports persistent connection since PHP 5.3.0
$this->persistency = (version_compare(PHP_VERSION, '5.3.0', '>=')) ? $persistency : false;
$this->user = $sqluser;