From: Michael J. Rubinsky Date: Wed, 4 Feb 2009 21:39:51 +0000 (-0500) Subject: Translate these config parameters from rails to pdo style. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9115f57f8f3da190a9f9f05b0db55135f51ac4d7;p=horde.git Translate these config parameters from rails to pdo style. Bug: 7948 --- diff --git a/framework/Db/lib/Horde/Db/Adapter/Mysqli.php b/framework/Db/lib/Horde/Db/Adapter/Mysqli.php index efb1c7f2a..77cc9d5a1 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Mysqli.php +++ b/framework/Db/lib/Horde/Db/Adapter/Mysqli.php @@ -386,7 +386,13 @@ class Horde_Db_Adapter_Mysqli extends Horde_Db_Adapter_Abstract $msg = 'Required config missing: ' . implode(', ', array_keys($diff)); throw new Horde_Db_Exception($msg); } - + $rails2pdo = array('database' => 'dbname', 'socket' => 'unix_socket'); + foreach ($rails2pdo as $from => $to) { + if (isset($this->_config[$from])) { + $this->_config[$to] = $this->_config[$from]; + unset($this->_config[$from]); + } + } if (isset($this->_config['port'])) { if (empty($this->_config['host'])) { $msg = 'host is required if port is specified';