diff options
author | Habeas Codice <habeascodice@federated.social> | 2014-11-17 15:15:02 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2014-11-17 15:15:02 -0800 |
commit | 96427a23a3523daf2c1966fe1b8a6e119e797e50 (patch) | |
tree | a7aaea69271817bbc8f78396f0d98052ca52d3f3 /include/dba/dba_driver.php | |
parent | bcaa32a83a965f111bfc2ba085a59857a4fa0c2d (diff) | |
parent | e59f7cc198fb038cd8344c2d403b423d57300a96 (diff) | |
download | volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.tar.gz volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.tar.bz2 volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.zip |
Merge branch 'master' of https://github.com/habeascodice/red
Diffstat (limited to 'include/dba/dba_driver.php')
-rwxr-xr-x | include/dba/dba_driver.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index 103dc8fcc..1bb45b06d 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -24,7 +24,10 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) { $dba = null; - if($dbtype == 1) { + + $dbtype = intval($dbtype); + + if($dbtype == DBTYPE_POSTGRES) { require_once('include/dba/dba_postgres.php'); if(is_null($port)) $port = 5432; $dba = new dba_postgres($server, $port, $user, $pass, $db, $install); @@ -39,6 +42,7 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) { $dba = new dba_mysql($server, $port,$user,$pass,$db,$install); } } + define('NULL_DATE', $dba->get_null_date()); define('ACTIVE_DBTYPE', $dbtype); return $dba; @@ -371,7 +375,7 @@ function db_getfunc($f) { if(isset($lookup[$f]) && isset($lookup[$f][ACTIVE_DBTYPE])) return $lookup[$f][ACTIVE_DBTYPE]; - logger('Unable to abstract DB function "'. $f . '"', LOG_DEBUG); + logger('Unable to abstract DB function "'. $f . '" for dbtype ' . ACTIVE_DBTYPE, LOGGER_DEBUG); return $f; } |