diff options
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 5ae0442a3..c7bca96d8 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -48,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Drivers * @category Database * @author EllisLab Dev Team - * @link https://codeigniter.com/user_guide/database/ + * @link https://codeigniter.com/userguide3/database/ */ abstract class CI_DB_driver { @@ -887,6 +887,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; + } // -------------------------------------------------------------------- |