diff options
-rwxr-xr-x | include/dba/dba_driver.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index 498bfffa7..e15e107a8 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -32,6 +32,8 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) { if(is_null($port)) $set_port = 5432; $dba = new dba_postgres($server, $set_port, $user, $pass, $db, $install); } else { + +// Highly experimental at the present time. // require_once('include/dba/dba_pdo.php'); // $dba = new dba_pdo($server, $set_port,$user,$pass,$db,$install); // } @@ -42,13 +44,12 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) { $dba = new dba_mysqli($server, $set_port,$user,$pass,$db,$install); } } + + // Until we have a proper PDO driver, store the DB connection parameters for + // plugins/addons which use PDO natively (such as cdav). This is wasteful as + // it opens a separate connection to the DB, but saves a lot of effort re-writing + // third-party interfaces that are working and well tested. -// else { -// if (is_null($port)) $set_port = "3306"; -// require_once('include/dba/dba_mysql.php'); -// $dba = new dba_mysql($server, $set_port,$user,$pass,$db,$install); -// } -// } if(is_object($dba) && $dba->connected) { $dns = (($dbtype == DBTYPE_POSTGRES) ? 'postgres' : 'mysql') |