Avoid running validation again, when saveAll() is called with 'validate' => 'first'

This commit is contained in:
Ceeram 2012-04-16 09:45:44 +02:00
parent d136fac219
commit 9556ff714d

View file

@ -2044,7 +2044,7 @@ class Model extends Object implements CakeEventListener {
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
return $validates;
}
$options['validate'] = true;
$options['validate'] = false;
}
if ($options['atomic']) {
@ -2175,7 +2175,7 @@ class Model extends Object implements CakeEventListener {
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
return $validates;
}
$options['validate'] = true;
$options['validate'] = false;
}
if ($options['atomic']) {
$db = $this->getDataSource();