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:
Jose Lorenzo Rodriguez 2011-10-16 17:56:22 -04:30
commit 7c5352a6c2
2 changed files with 4 additions and 8 deletions

View file

@ -0,0 +1 @@
<p>test element</p>

View file

@ -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;
}
}
}
}