mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Closes #4156
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6878 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ea9e91218e
commit
52245a059f
2 changed files with 2 additions and 2 deletions
|
@ -221,9 +221,8 @@ class TranslateBehavior extends ModelBehavior {
|
||||||
/**
|
/**
|
||||||
* Callback
|
* Callback
|
||||||
*/
|
*/
|
||||||
function beforeSave(&$model) {
|
function beforeValidate(&$model) {
|
||||||
$locale = $this->_getLocale($model);
|
$locale = $this->_getLocale($model);
|
||||||
|
|
||||||
if (empty($locale)) {
|
if (empty($locale)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,6 +378,7 @@ class TranslateTest extends CakeTestCase {
|
||||||
|
|
||||||
function testMultipleUpdate() {
|
function testMultipleUpdate() {
|
||||||
$this->Model->locale = 'eng';
|
$this->Model->locale = 'eng';
|
||||||
|
$this->Model->validate['title'] = VALID_NOT_EMPTY;
|
||||||
$data = array('TranslatedItem' => array(
|
$data = array('TranslatedItem' => array(
|
||||||
'id' => 1,
|
'id' => 1,
|
||||||
'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'),
|
'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue