1
0
mirror of synced 2024-12-13 22:56:04 +03:00

oci8 alias fix

This commit is contained in:
zYne 2007-04-17 22:16:11 +00:00
parent b1c307c40a
commit 68de3e8244

View File

@ -345,6 +345,7 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
case 'pgsql':
case 'odbc':
case 'mock':
case 'oracle':
if ( ! isset($parts['path']) || $parts['path'] == '/') {
throw new Doctrine_Db_Exception('No database availible in data source name');
}
@ -354,7 +355,14 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
if ( ! isset($parts['host'])) {
throw new Doctrine_Db_Exception('No hostname set in data source name');
}
$parts['dsn'] = $parts["scheme"].":host=".$parts["host"].";dbname=".$parts["database"];
if (isset(self::$driverMap[$parts['scheme']])) {
$parts['scheme'] = self::$driverMap[$parts['scheme']];
}
$parts['dsn'] = $parts['scheme'] . ':host='
. $parts['host'] . ';dbname='
. $parts['database'];
if (isset($parts['port'])) {
// append port to dsn if supplied