mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
Adding fix for #2538, fixes findAll doesn't work with TranslateBehavior when specifying which fields to fetch
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5045 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
6837a51f50
commit
4353341e2c
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
} else {
|
||||
foreach($fields as $key => $value) {
|
||||
$field = ife(is_numeric($key), $value, $key);
|
||||
if($autoFields || in_array($model->name.'.'.$field, $query['fields'])) {
|
||||
if($autoFields || in_array($model->name.'.'.$field, $query['fields']) || in_array($field, $query['fields'])) {
|
||||
$addFields[] = $field;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue