Skip to content

Commit

Permalink
restoring commented code to make more tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Oct 26, 2010
1 parent e989f71 commit 90274ef
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cake/libs/model/behaviors/translate.php
Expand Up @@ -132,13 +132,13 @@ public function beforeFind(&$model, $query) {
$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) {
Expand Down

0 comments on commit 90274ef

Please sign in to comment.