mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'master' into 2.0
Conflicts: cake/libs/controller/components/request_handler.php cake/libs/view/pages/home.ctp cake/libs/view/view.php cake/tests/cases/libs/view/view.test.php lib/Cake/Cache/Engine/FileEngine.php lib/Cake/Config/config.php lib/Cake/Console/cake lib/Cake/Model/Behavior/TranslateBehavior.php lib/Cake/VERSION.txt
This commit is contained in:
commit
7c5352a6c2
2 changed files with 4 additions and 8 deletions
1
cake/tests/test_app/views/elements/test_element.xml
Normal file
1
cake/tests/test_app/views/elements/test_element.xml
Normal file
|
@ -0,0 +1 @@
|
|||
<p>test element</p>
|
|
@ -169,21 +169,16 @@ class TranslateBehavior extends ModelBehavior {
|
|||
$query['fields'][] = 'i18n_'.$field;
|
||||
}
|
||||
$query['joins'][] = array(
|
||||
'type' => 'LEFT',
|
||||
'type' => 'INNER',
|
||||
'alias' => 'I18n__'.$field,
|
||||
'table' => $joinTable,
|
||||
'conditions' => array(
|
||||
$model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}.foreign_key"),
|
||||
'I18n__'.$field.'.model' => $model->name,
|
||||
'I18n__'.$field.'.'.$RuntimeModel->displayField => $aliasField
|
||||
'I18n__'.$field.'.'.$RuntimeModel->displayField => $field,
|
||||
'I18n__'.$field.'.locale' => $locale
|
||||
)
|
||||
);
|
||||
|
||||
if (is_string($query['conditions'])) {
|
||||
$query['conditions'] = $db->conditions($query['conditions'], true, false, $model) . ' AND '.$db->name('I18n__'.$field.'.locale').' = \''.$locale.'\'';
|
||||
} else {
|
||||
$query['conditions'][$db->name("I18n__{$field}.locale")] = $locale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue