[BUGFIX] DataHandler should inherit $isImporting 36/49936/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 13 Sep 2016 18:55:59 +0000 (20:55 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 13 Sep 2016 18:56:26 +0000 (20:56 +0200)
When DataHandler uses getLocalTCE() the option
for "isImporting" is not transferred, causing
a lot of inconsistencies with hooks relying
on this option (e.g. l10nmgr+gridelements).

Resolves: #77937
Releases: master, 7.6
Change-Id: I70c0ca7741d217764cbe9702efc1d09308923311
Reviewed-on: https://review.typo3.org/49936
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 2bc7f02..ab0f468 100644 (file)
@@ -5667,6 +5667,9 @@ class DataHandler
         $copyTCE->cachedTSconfig = $this->cachedTSconfig;
         // Transformations should NOT be carried out during copy
         $copyTCE->dontProcessTransformations = $dontProcessTransformations;
+        // make sure the isImporting flag is transferred, so all hooks know if
+        // the current process is an import process
+        $copyTCE->isImporting = $this->isImporting;
         return $copyTCE;
     }