mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updating translate recursive handling, fixes #5593
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7823 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f2823e85d7
commit
e2a5f38b36
1 changed files with 9 additions and 7 deletions
|
@ -115,6 +115,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
if (empty($query['fields'])) {
|
||||
$query['fields'] = array($model->alias.'.*');
|
||||
|
||||
if ($model->recursive >= 0) {
|
||||
foreach (array('hasOne', 'belongsTo') as $type) {
|
||||
foreach ($model->{$type} as $key => $value) {
|
||||
|
||||
|
@ -127,6 +128,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$autoFields = true;
|
||||
}
|
||||
$fields = array_merge($this->settings[$model->alias], $this->runtime[$model->alias]['fields']);
|
||||
|
|
Loading…
Reference in a new issue