[BUGFIX] Invalid handling of "mergeIfNotBlank" in backend 21/42121/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 29 Jul 2015 21:22:48 +0000 (23:22 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 30 Jul 2015 11:18:19 +0000 (13:18 +0200)
This is a partial backport of #68592 to fix the title part
in the backend for 6.2 as well.

Change-Id: I56fce644416baf5e26c359c1767bb0569b02cbf4
Resolves: #68624
Related: #68592
Releases: 6.2
Reviewed-on: http://review.typo3.org/42121
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php

index 7cccb9c..40cd385 100644 (file)
@@ -1953,7 +1953,7 @@ class BackendUtility {
                        $l10n_mode = isset($GLOBALS['TCA'][$originalTable]['columns'][$field]['l10n_mode'])
                                ? $GLOBALS['TCA'][$originalTable]['columns'][$field]['l10n_mode']
                                : '';
-                       if ($l10n_mode === 'exclude' || ($l10n_mode === 'mergeIfNotBlank' && trim($originalRow[$field]) !== '')) {
+                       if ($l10n_mode === 'exclude' || ($l10n_mode === 'mergeIfNotBlank' && trim($row[$field]) === '')) {
                                $row[$field] = $originalRow[$field];
                        }
                }
index 418fa2b..d51bd7d 100644 (file)
@@ -1342,7 +1342,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                ),
                                array(
                                        'origUid' => 1,
-                                       'field2' => 'basic',
+                                       'field2' => 'fdas',
                                        'field3' => 'trans',
                                )
                        ),
@@ -1350,7 +1350,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'foo',
                                array(
                                        'origUid' => 1,
-                                       'field2' => 'fdas',
+                                       'field2' => '',
                                        'field3' => 'trans',
                                ),
                                array(