From eaeaad5e974223d814ad7e0fa01d1923dc3c571a Mon Sep 17 00:00:00 2001 From: Katsumi Honda Date: Tue, 19 Mar 2013 17:56:09 +0900 Subject: Fixed problem for transaction test mode. trans_complete function is committed in test mode. Because any database drivers are set _trans_failure in test_mode, And trans_complete function is not evaluate _trans_failure. --- system/database/DB_driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 18dbbc76e..3e6378448 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -816,7 +816,7 @@ abstract class CI_DB_driver { } // The query() function will set this flag to FALSE in the event that a query failed - if ($this->_trans_status === FALSE) + if ($this->_trans_status === FALSE || $this->_trans_failure === TRUE) { $this->trans_rollback(); @@ -1859,4 +1859,4 @@ abstract class CI_DB_driver { } /* End of file DB_driver.php */ -/* Location: ./system/database/DB_driver.php */ \ No newline at end of file +/* Location: ./system/database/DB_driver.php */ -- cgit v1.2.3-24-g4f1b From 93f0b8f642abbafdb0b543f348ff1655adf919e6 Mon Sep 17 00:00:00 2001 From: Katsumi Honda Date: Wed, 3 Apr 2013 21:31:53 +0900 Subject: fixed for styleguide. || to OR remove the empty line at EOF --- system/database/DB_driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 3e6378448..4f2f491ee 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -816,7 +816,7 @@ abstract class CI_DB_driver { } // The query() function will set this flag to FALSE in the event that a query failed - if ($this->_trans_status === FALSE || $this->_trans_failure === TRUE) + if ($this->_trans_status === FALSE or $this->_trans_failure === TRUE) { $this->trans_rollback(); @@ -1859,4 +1859,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 -- cgit v1.2.3-24-g4f1b From fa99dc6e81cecfca434ba5b94d9f59647aa721c6 Mon Sep 17 00:00:00 2001 From: Katsumi Honda Date: Wed, 3 Apr 2013 22:47:34 +0900 Subject: Fixed for styleguide. --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 4f2f491ee..b78f35a65 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -816,7 +816,7 @@ abstract class CI_DB_driver { } // The query() function will set this flag to FALSE in the event that a query failed - if ($this->_trans_status === FALSE or $this->_trans_failure === TRUE) + if ($this->_trans_status === FALSE OR $this->_trans_failure === TRUE) { $this->trans_rollback(); -- cgit v1.2.3-24-g4f1b