mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
updating TranslateBehavior to handle one set of content per model, not per alias. fixes #4461
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6655 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
dc5742d28f
commit
c38c6a21ba
1 changed files with 3 additions and 3 deletions
|
@ -92,7 +92,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
'table' => $db->name($tablePrefix . $RuntimeModel->useTable),
|
||||
'conditions' => array(
|
||||
$model->alias.'.id' => '{$__cakeIdentifier['.$RuntimeModel->alias.'.foreign_key]__$}',
|
||||
$RuntimeModel->alias.'.model' => $model->alias,
|
||||
$RuntimeModel->alias.'.model' => $model->name,
|
||||
$RuntimeModel->alias.'.locale' => $locale
|
||||
)
|
||||
);
|
||||
|
@ -149,7 +149,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
'table' => $db->name($tablePrefix . $RuntimeModel->useTable),
|
||||
'conditions' => array(
|
||||
$model->alias.'.id' => '{$__cakeIdentifier[I18n__'.$field.'__'.$_locale.'.foreign_key]__$}',
|
||||
'I18n__'.$field.'__'.$_locale.'.model' => $model->alias,
|
||||
'I18n__'.$field.'__'.$_locale.'.model' => $model->name,
|
||||
'I18n__'.$field.'__'.$_locale.'.'.$RuntimeModel->displayField => $field,
|
||||
'I18n__'.$field.'__'.$_locale.'.locale' => $_locale
|
||||
)
|
||||
|
@ -163,7 +163,7 @@ class TranslateBehavior extends ModelBehavior {
|
|||
'table' => $db->name($tablePrefix . $RuntimeModel->useTable),
|
||||
'conditions' => array(
|
||||
$model->alias.'.id' => '{$__cakeIdentifier[I18n__'.$field.'.foreign_key]__$}',
|
||||
'I18n__'.$field.'.model' => $model->alias,
|
||||
'I18n__'.$field.'.model' => $model->name,
|
||||
'I18n__'.$field.'.'.$RuntimeModel->displayField => $field
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue