[BUGFIX] Respect "disablePrependAtCopy" during translation 24/58424/3
authorGianluigi Martino <gmartino27@gmail.com>
Fri, 28 Sep 2018 06:40:01 +0000 (08:40 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 28 Sep 2018 12:18:03 +0000 (14:18 +0200)
During the translation process the option "disablePrependAtCopy" is not
respected. With this patch the option is respected again for pages and
tt_content.

Resolves: #86293
Releases: master, 8.7
Change-Id: I821f3fed7d3e0637298262c4bd2c11003618f1c5
Reviewed-on: https://review.typo3.org/58424
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Tested-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 87419a1..3e859f2 100644 (file)
@@ -4931,7 +4931,8 @@ class DataHandler implements LoggerAwareInterface
                 if (($fCfg['config']['type'] === 'text' || $fCfg['config']['type'] === 'input') && (string)$row[$fN] !== '') {
                     list($tscPID) = BackendUtility::getTSCpid($table, $uid, '');
                     $TSConfig = BackendUtility::getPagesTSconfig($tscPID)['TCEMAIN.'] ?? [];
-                    if (!empty($TSConfig['translateToMessage'])) {
+                    $tE = $this->getTableEntries($table, $TSConfig);
+                    if (!empty($TSConfig['translateToMessage']) && !$tE['disablePrependAtCopy']) {
                         $translateToMsg = $this->getLanguageService()->sL($TSConfig['translateToMessage']);
                         $translateToMsg = @sprintf($translateToMsg, $langRec['title']);
                     }