Fixing blackHole when form has more than one model with check boxes

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5742 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-10-09 18:47:32 +00:00
parent 28bc0879b2
commit 348e31530a

View file

@ -484,8 +484,8 @@ class SecurityComponent extends Object {
}
}
}
$merge = array();
foreach ($check as $key => $value) {
$merge = array();
if ($key === '__Token') {
$field[$key] = $value;
continue;
@ -515,8 +515,11 @@ class SecurityComponent extends Object {
$merge[] = $lookup;
}
}
if (isset($field[$newKey])) {
$field[$newKey] = array_merge($merge, $field[$newKey]);
} else {
$field[$newKey] = $merge;
}
$controller->data[$newKey] = Set::pushDiff($controller->data[$key], $controller->data[$newKey]);
unset($controller->data[$key]);
@ -601,4 +604,4 @@ class SecurityComponent extends Object {
}
}
}
?>
?>