Fix port for internal db

Fix db factory to use that port

refs #4941
This commit is contained in:
Marius Hein 2013-10-22 13:49:04 +02:00
parent 6017432750
commit 9ebd2c0478
2 changed files with 4 additions and 1 deletions

3
config/resources.ini.in Normal file → Executable file
View File

@ -17,6 +17,7 @@
type = db
db = @internal_db_type@
host = @internal_db_host@
port = @internal_db_port@
password = @internal_db_pass@
username = @internal_db_user@
dbname = @internal_db_name@
@ -25,7 +26,7 @@ dbname = @internal_db_name@
type = db
db = @ido_db_type@
host = @ido_host@
port = @ido_port@
password = @ido_user@
username = @ido_user@
port = @ido_port@
dbname = @ido_database@

View File

@ -219,8 +219,10 @@ class DbAdapterFactory implements ConfigAwareFactory
);
switch ($config->db) {
case 'mysql':
$options['port'] = $config->get('port', 3306);
return self::callFactory('Pdo_Mysql', $options);
case 'pgsql':
$options['port'] = $config->get('port', 5432);
return self::callFactory('Pdo_Pgsql', $options);
default:
if (!$config->db) {