Renaming $__transactionStarted to $_transactionStarted (ticket #2141)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4527 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
dho 2007-02-17 08:28:09 +00:00
parent 34c63427fb
commit 076a5dbd63
12 changed files with 26 additions and 33 deletions

View file

@ -174,9 +174,9 @@ class DataSource extends Object{
* Whether or not this DataSource is in the middle of a transaction
*
* @var boolean
* @access public
* @access protected
*/
var $__transactionStarted = false;
var $_transactionStarted = false;
/**
* Constructor.
*/

View file

@ -152,7 +152,7 @@ class DboAdodb extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if ($this->_adodb->BeginTrans()) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -168,7 +168,7 @@ class DboAdodb extends DboSource {
*/
function commit(&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->_adodb->CommitTrans();
}
return false;

View file

@ -276,7 +276,7 @@ class DboDb2 extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_OFF)) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -293,7 +293,7 @@ class DboDb2 extends DboSource {
function commit(&$model) {
if (parent::commit($model)) {
if (db2_commit($this->connection)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
return true;
}
@ -310,7 +310,7 @@ class DboDb2 extends DboSource {
*/
function rollback(&$model) {
if (parent::rollback($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
return db2_rollback($this->connection);
}

View file

@ -327,7 +327,7 @@ class DboMssql extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if ($this->execute('BEGIN TRANSACTION')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -343,7 +343,7 @@ class DboMssql extends DboSource {
*/
function commit(&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->execute('COMMIT');
}
return false;

View file

@ -268,7 +268,7 @@ class DboMysql extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if ($this->execute('START TRANSACTION')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -284,7 +284,7 @@ class DboMysql extends DboSource {
*/
function commit(&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->execute('COMMIT');
}
return false;

View file

@ -242,7 +242,7 @@ class DboMysqli extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if ($this->execute('START TRANSACTION')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -258,7 +258,7 @@ class DboMysqli extends DboSource {
*/
function commit(&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->execute('COMMIT');
}
return false;

View file

@ -275,7 +275,7 @@ class DboOdbc extends DboSource{
function begin(&$model) {
if (parent::begin($model)) {
if (odbc_autocommit($this->connection, false)) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -294,7 +294,7 @@ class DboOdbc extends DboSource{
function commit(&$model) {
if (parent::commit($model)) {
if (odbc_commit($this->connection)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return true;
}
}
@ -312,7 +312,7 @@ class DboOdbc extends DboSource{
*/
function rollback(&$model) {
if (parent::rollback($model)) {
$this->__transactionStarted=false;
$this->_transactionStarted=false;
return odbc_rollback($this->connection);
}

View file

@ -61,13 +61,6 @@ class DboOracle extends DboSource {
*/
var $sequence = '';
/**
* Transaction in progress flag
*
* @var boolean
*/
var $__transactionStarted = false;
/**
* Enter description here...
*
@ -245,7 +238,7 @@ class DboOracle extends DboSource {
if (!$this->_statementId) {
return null;
}
if ($this->__transactionStarted) {
if ($this->_transactionStarted) {
$mode = OCI_DEFAULT;
} else {
$mode = OCI_COMMIT_ON_SUCCESS;
@ -404,7 +397,7 @@ class DboOracle extends DboSource {
function begin(&$model) {
//if (parent::begin($model)) {
//if ($this->execute('BEGIN')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
//}
//}
@ -434,7 +427,7 @@ class DboOracle extends DboSource {
*/
function commit(&$model) {
//if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return ocicommit($this->connection);
//}
//return false;

View file

@ -263,7 +263,7 @@ class DboPostgres extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if ($this->execute('BEGIN')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -280,7 +280,7 @@ class DboPostgres extends DboSource {
*/
function commit(&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->execute('COMMIT');
}
return false;

View file

@ -227,7 +227,7 @@ class DboSqlite extends DboSource {
function begin (&$model) {
if (parent::begin($model)) {
if ($this->execute('BEGIN')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -243,7 +243,7 @@ class DboSqlite extends DboSource {
*/
function commit (&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->execute('COMMIT');
}
return false;

View file

@ -235,7 +235,7 @@ class DboSybase extends DboSource {
function begin(&$model) {
if (parent::begin($model)) {
if ($this->execute('START TRANSACTION')) {
$this->__transactionStarted = true;
$this->_transactionStarted = true;
return true;
}
}
@ -251,7 +251,7 @@ class DboSybase extends DboSource {
*/
function commit(&$model) {
if (parent::commit($model)) {
$this->__transactionStarted = false;
$this->_transactionStarted = false;
return $this->execute('COMMIT');
}
return false;

View file

@ -1596,7 +1596,7 @@ class DboSource extends DataSource {
*
*/
function __destruct() {
if ($this->__transactionStarted) {
if ($this->_transactionStarted) {
$this->rollback();
}
$this->close();