Remove unnecessary param when calling begin, commit and rollback on datasource.

This commit is contained in:
Majna 2012-01-17 21:52:22 +01:00
parent c718b102a9
commit 826374e57c

View file

@ -2034,7 +2034,7 @@ class Model extends Object implements CakeEventListener {
if ($options['atomic']) { if ($options['atomic']) {
$db = $this->getDataSource(); $db = $this->getDataSource();
$transactionBegun = $db->begin($this); $transactionBegun = $db->begin();
} }
$return = array(); $return = array();
foreach ($data as $key => $record) { foreach ($data as $key => $record) {
@ -2055,12 +2055,12 @@ class Model extends Object implements CakeEventListener {
} }
if ($validates) { if ($validates) {
if ($transactionBegun) { if ($transactionBegun) {
return $db->commit($this) !== false; return $db->commit() !== false;
} else { } else {
return true; return true;
} }
} }
$db->rollback($this); $db->rollback();
return false; return false;
} }
@ -2138,7 +2138,7 @@ class Model extends Object implements CakeEventListener {
} }
if ($options['atomic']) { if ($options['atomic']) {
$db = $this->getDataSource(); $db = $this->getDataSource();
$transactionBegun = $db->begin($this); $transactionBegun = $db->begin();
} }
$associations = $this->getAssociated(); $associations = $this->getAssociated();
$return = array(); $return = array();
@ -2200,12 +2200,12 @@ class Model extends Object implements CakeEventListener {
} }
if ($validates) { if ($validates) {
if ($transactionBegun) { if ($transactionBegun) {
return $db->commit($this) !== false; return $db->commit() !== false;
} else { } else {
return true; return true;
} }
} }
$db->rollback($this); $db->rollback();
return false; return false;
} }