Skip to content

Commit

Permalink
added db2 support
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/DBA/trunk@97428 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Brent Cook committed Sep 30, 2002
1 parent be152bf commit 1ad44da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DBA.php
Expand Up @@ -57,11 +57,11 @@ function &create($driver = 'file')
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);
}
}

Expand Down Expand Up @@ -94,7 +94,7 @@ function db_exists($name, $driver = 'file')
*/
function getDriverList()
{
return array('gdbm', 'db3', 'file');
return array('gdbm', 'db3', 'db2', 'file');
}
}
?>

0 comments on commit 1ad44da

Please sign in to comment.