explain what we're doing and where we're going with this.

This commit is contained in:
redmatrix 2016-05-18 22:03:43 -07:00
parent ada26dd2cb
commit 3355210878

View File

@ -32,6 +32,8 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) {
if(is_null($port)) $set_port = 5432; if(is_null($port)) $set_port = 5432;
$dba = new dba_postgres($server, $set_port, $user, $pass, $db, $install); $dba = new dba_postgres($server, $set_port, $user, $pass, $db, $install);
} else { } else {
// Highly experimental at the present time.
// require_once('include/dba/dba_pdo.php'); // require_once('include/dba/dba_pdo.php');
// $dba = new dba_pdo($server, $set_port,$user,$pass,$db,$install); // $dba = new dba_pdo($server, $set_port,$user,$pass,$db,$install);
// } // }
@ -43,12 +45,11 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) {
} }
} }
// else { // Until we have a proper PDO driver, store the DB connection parameters for
// if (is_null($port)) $set_port = "3306"; // plugins/addons which use PDO natively (such as cdav). This is wasteful as
// require_once('include/dba/dba_mysql.php'); // it opens a separate connection to the DB, but saves a lot of effort re-writing
// $dba = new dba_mysql($server, $set_port,$user,$pass,$db,$install); // third-party interfaces that are working and well tested.
// }
// }
if(is_object($dba) && $dba->connected) { if(is_object($dba) && $dba->connected) {
$dns = (($dbtype == DBTYPE_POSTGRES) ? 'postgres' : 'mysql') $dns = (($dbtype == DBTYPE_POSTGRES) ? 'postgres' : 'mysql')