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