Commit 68de3e82 authored by zYne's avatar zYne

oci8 alias fix

parent b1c307c4
...@@ -345,6 +345,7 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte ...@@ -345,6 +345,7 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
case 'pgsql': case 'pgsql':
case 'odbc': case 'odbc':
case 'mock': case 'mock':
case 'oracle':
if ( ! isset($parts['path']) || $parts['path'] == '/') { if ( ! isset($parts['path']) || $parts['path'] == '/') {
throw new Doctrine_Db_Exception('No database availible in data source name'); 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 ...@@ -354,7 +355,14 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
if ( ! isset($parts['host'])) { if ( ! isset($parts['host'])) {
throw new Doctrine_Db_Exception('No hostname set in data source name'); 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'])) { if (isset($parts['port'])) {
// append port to dsn if supplied // append port to dsn if supplied
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment