[ticket/10678] More formatting requests

PHPBB3-10678
This commit is contained in:
Patrick Webster 2012-03-04 17:19:33 -06:00
parent 5cbe919256
commit 0a596c4b8c
2 changed files with 5 additions and 8 deletions

View file

@ -16,10 +16,10 @@
*/
class phpbb_database_connection_ODBC_PDO_wrapper extends PDO
{
//Name of the driver being used (i.e. mssql, firebird)
// Name of the driver being used (i.e. mssql, firebird)
public $driver = '';
//Version number of driver since PDO::getAttribute(PDO::ATTR_CLIENT_VERSION) is pretty useless for this
// Version number of driver since PDO::getAttribute(PDO::ATTR_CLIENT_VERSION) is pretty useless for this
public $version = 0;
function __construct($dbms, $version, $dsn, $user, $pass)

View file

@ -8,7 +8,7 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_install.php';
require_once 'phpbb_database_connection_helper.php';
require_once dirname(__FILE__) . '/phpbb_database_connection_helper.php';
class phpbb_database_test_connection_manager
{
@ -86,13 +86,10 @@ class phpbb_database_test_connection_manager
//These require different connection strings on the phpBB side than they do in PDO
//so you must provide a DSN string for ODBC separately
if ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird')
{
if (!empty($this->config['custom_dsn']))
if (!empty($this->config['custom_dsn']) && ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird'))
{
$dsn = 'odbc:' . $this->config['custom_dsn'];
}
}
try
{