summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/ibase
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-25 14:21:41 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-25 14:21:41 +0100
commit2e171023bae38735ec08bbd9cb160cee75edbc62 (patch)
tree15327555ec2101f723f6ae35c6c388abf1b18317 /system/database/drivers/ibase
parente7d017bcc38909f55e8f817b27263e59d1ca5598 (diff)
Make db_pconnect an alias for db_connect(TRUE) and reduce code repetition
Diffstat (limited to 'system/database/drivers/ibase')
-rw-r--r--system/database/drivers/ibase/ibase_driver.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php
index 4cff5f448..c85b19955 100644
--- a/system/database/drivers/ibase/ibase_driver.php
+++ b/system/database/drivers/ibase/ibase_driver.php
@@ -69,23 +69,14 @@ class CI_DB_ibase_driver extends CI_DB {
/**
* Non-persistent database connection
*
+ * @param bool $persistent
* @return resource
*/
- public function db_connect()
+ public function db_connect($persistent = FALSE)
{
- return @ibase_connect($this->hostname.':'.$this->database, $this->username, $this->password, $this->char_set);
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Persistent database connection
- *
- * @return resource
- */
- public function db_pconnect()
- {
- return @ibase_pconnect($this->hostname.':'.$this->database, $this->username, $this->password, $this->char_set);
+ return ($persistent === TRUE)
+ ? @ibase_pconnect($this->hostname.':'.$this->database, $this->username, $this->password, $this->char_set)
+ : @ibase_connect($this->hostname.':'.$this->database, $this->username, $this->password, $this->char_set);
}
// --------------------------------------------------------------------