summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index a955f45d2..a0812d4c7 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1152,7 +1152,7 @@ abstract class CI_DB_driver {
{
if ($this->conn_id)
{
- $this->_close($this->conn_id);
+ $this->_close();
$this->conn_id = FALSE;
}
}
@@ -1160,6 +1160,20 @@ abstract class CI_DB_driver {
// --------------------------------------------------------------------
/**
+ * Close DB Connection
+ *
+ * This method would be overriden by most of the drivers.
+ *
+ * @return void
+ */
+ protected function _close()
+ {
+ $this->conn_id = FALSE;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Display an error message
*
* @param string the error message
@@ -1401,7 +1415,7 @@ abstract class CI_DB_driver {
*/
public function __destruct()
{
- if ($this->conn_id && ! $this->pconnect)
+ if ( ! $this->pconnect)
{
$this->close();
}
@@ -1410,4 +1424,4 @@ abstract class CI_DB_driver {
}
/* End of file DB_driver.php */
-/* Location: ./system/database/DB_driver.php */
+/* Location: ./system/database/DB_driver.php */ \ No newline at end of file