mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Remove unnecessary param when calling begin, commit and rollback on datasource.
This commit is contained in:
parent
c718b102a9
commit
826374e57c
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue