diff options
author | Andrey Andreev <narf@devilix.net> | 2020-01-28 20:39:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 20:39:30 +0100 |
commit | 2ad24af488da7dc518684cc146914b2937749031 (patch) | |
tree | ed521666411579749d117091df4b507268830b14 /system | |
parent | 28f50a8f4a701e76b17aa91f00fae662aea22876 (diff) | |
parent | 259da38bedb09b4df1a94a922ec9b3e8d4f53d23 (diff) |
[ci skip] Merge pull request #5890 from jerkob/develop
Adds a public trans_active function to determine transaction state
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_driver.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index b4f16b905..f3433f849 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -825,6 +825,18 @@ abstract class CI_DB_driver { { return $this->_trans_status; } + + // -------------------------------------------------------------------- + + /** + * Returns TRUE if a transaction is currently active + * + * @return bool + */ + public function trans_active() + { + return (bool) $this->_trans_depth; + } // -------------------------------------------------------------------- |