Permalink
Browse files

add a function to Datasource to see if a transaction is currently run…

…ning
  • Loading branch information...
1 parent c34d8ee commit d5eb8f0ddffc22dff989f15ae563f7fac31cbd1d Dieter Plaetinck committed with Dieterbe Apr 7, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 cake/libs/model/datasources/datasource.php
@@ -314,6 +314,17 @@ function rollback(&$model) {
return $this->_transactionStarted;
}
+
+/**
+ * Check if a transaction is running
+ *
+ * @return boolean Returns true if a transaction is in progress
+ * @access public
+ */
+ function transactionStarted(&$model) {
+ return $this->_transactionStarted;
+ }
+
/**
* Converts column types to basic types
*

0 comments on commit d5eb8f0

Please sign in to comment.