summaryrefslogtreecommitdiffstats
path: root/system/drivers/DB_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/drivers/DB_driver.php')
-rw-r--r--system/drivers/DB_driver.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/system/drivers/DB_driver.php b/system/drivers/DB_driver.php
index b05cd7c5b..a1ec14b06 100644
--- a/system/drivers/DB_driver.php
+++ b/system/drivers/DB_driver.php
@@ -316,7 +316,7 @@ class CI_DB_driver {
* @access public
* @return void
*/
- function trans_start()
+ function trans_start($test_mode = FALSE)
{
if ( ! $this->trans_enabled)
{
@@ -330,9 +330,7 @@ class CI_DB_driver {
return;
}
- // Reset the transaction failure flag
- $this->_trans_failure = FALSE;
- $this->trans_begin();
+ $this->trans_begin($test_mode);
}
// --------------------------------------------------------------------
@@ -376,6 +374,20 @@ class CI_DB_driver {
// --------------------------------------------------------------------
/**
+ * Lets you retrieve the transaction flag to determine if it has failed
+ *
+ * @access public
+ * @return bool
+ */
+ function trans_status()
+ {
+ return $this->_trans_failure;
+ }
+
+
+ // --------------------------------------------------------------------
+
+ /**
* Enables a native PHP function to be run, using a platform agnostic wrapper.
*
* @access public