From 4353341e2c7ef86f927e4ef354ae0be215f9ed90 Mon Sep 17 00:00:00 2001 From: phpnut Date: Sat, 12 May 2007 08:30:55 +0000 Subject: [PATCH] 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 --- cake/libs/model/behaviors/translate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index f22cc8192..c4d901fd4 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -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; } }