diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index 9aa85feca..8d8be9f8f 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -132,13 +132,13 @@ class TranslateBehavior extends ModelBehavior { $this->runtime[$model->alias]['virtualFields'] = $model->virtualFields; if ($addFields) { foreach ($addFields as $field) { - // foreach (array($field, $model->alias.'.'.$field) as $_field) { - // $key = array_search($_field, $query['fields']); - // - // if ($key !== false) { - // unset($query['fields'][$key]); - // } - // } + foreach (array($field, $model->alias.'.'.$field) as $_field) { + $key = array_search($_field, (array)$query['fields']); + + if ($key !== false) { + unset($query['fields'][$key]); + } + } if (is_array($locale)) { foreach ($locale as $_locale) {