summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-23 11:27:17 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-23 11:27:17 +0200
commit79922c0d963de9728315db02deaf4d2516c94d5b (patch)
tree4e88347e682e05b9c73bfe91d43256775ea83343 /system/database/DB_driver.php
parent32593f9aa821a80f5e9fc2dbbae0b4f5f1078dd8 (diff)
Removed the parameter use in database drivers' _close() and added a default _close() method in CI_DB_driver + some changelog fixes
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