cvs: pear /DBA DBA.php
| From: | Brent Cook | Date: | Mon, 30 Sep 2002 02:52:02 +0000 |
| Subject: | cvs: pear /DBA DBA.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-6762@lists.php.net to get a copy of this message | ||
busterb Sun Sep 29 22:52:02 2002 EDT
Modified files:
/pear/DBA DBA.php
Log:
added db2 support
Index: pear/DBA/DBA.php
diff -u pear/DBA/DBA.php:1.23 pear/DBA/DBA.php:1.24
--- pear/DBA/DBA.php:1.23 Thu Sep 26 08:59:51 2002
+++ pear/DBA/DBA.php Sun Sep 29 22:52:01 2002
@@ -18,7 +18,7 @@
// | Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA|
// +----------------------------------------------------------------------+
//
-// $Id: DBA.php,v 1.23 2002/09/26 12:59:51 busterb Exp $
+// $Id: DBA.php,v 1.24 2002/09/30 02:52:01 busterb Exp $
//
require_once('PEAR.php');
@@ -57,11 +57,11 @@
if (!function_exists('dba_open') || ($driver=='file')) {
require_once 'DBA/Driver/File.php';
return new DBA_Driver_File();
- } elseif (($driver == 'db3') || ($driver == 'gdbm')) {
+ } elseif (in_array($driver, DBA::getDriverList()) {
require_once 'DBA/Driver/Builtin.php';
return new DBA_Driver_Builtin($driver);
} else {
- return PEAR::raiseError('Unknown DBA driver, '.$driver);
+ return PEAR::raiseError('Unsupported DBA driver, '.$driver);
}
}
@@ -94,7 +94,7 @@
*/
function getDriverList()
{
- return array('gdbm', 'db3', 'file');
+ return array('gdbm', 'db3', 'db2', 'file');
}
}
?>