summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-25 00:46:32 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-25 00:46:32 +0200
commit85d1bd879346a52ec5000790e71785a39bbcf580 (patch)
treea434563e659f274d6d6d543cbed6886c77530cbb /system/database/drivers/pdo/pdo_driver.php
parentbb092b600e6367ab97fb3139c0b72b3242d9c560 (diff)
Add pdo_cubrid subdriver
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index b8724e974..c3eb7cccd 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -129,21 +129,20 @@ class CI_DB_pdo_driver extends CI_DB {
$this->dsn = $this->subdriver.':';
// Add hostname to the DSN for databases that need it
- if ( ! empty($this->hostname) && strpos($this->hostname, ':') === FALSE
- && in_array($this->subdriver, array('informix', 'cubrid')))
+ if ( ! empty($this->hostname) && strpos($this->hostname, ':') === FALSE && $this->subdriver === 'informix')
{
$this->dsn .= 'host='.$this->hostname.';';
}
// Add a port to the DSN for databases that can use it
- if ( ! empty($this->port) && in_array($this->subdriver, array('informix', 'ibm', 'cubrid')))
+ if ( ! empty($this->port) && in_array($this->subdriver, array('informix', 'ibm'), TRUE))
{
$this->dsn .= 'port='.$this->port.';';
}
}
// Add the database name to the DSN, if needed
- if (stripos($this->dsn, 'dbname') === FALSE && in_array($this->subdriver, array('4D', 'cubrid')))
+ if (stripos($this->dsn, 'dbname') === FALSE && $this->subdriver === '4D')
{
$this->dsn .= 'dbname='.$this->database.';';
}