mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
restoring commented code to make more tests pass
This commit is contained in:
parent
e989f71b99
commit
90274ef859
1 changed files with 7 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue