Make db_pconnect an alias for db_connect(TRUE) and reduce code repetition
diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php
index 4cff5f4..c85b199 100644
--- a/system/database/drivers/ibase/ibase_driver.php
+++ b/system/database/drivers/ibase/ibase_driver.php
@@ -69,23 +69,14 @@
/**
* 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);
}
// --------------------------------------------------------------------