[BUGFIX] Update tstamp on inline relation addition 23/54423/2
authorSusanne Moog <susanne.moog@typo3.com>
Tue, 17 Oct 2017 21:05:45 +0000 (23:05 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 17 Oct 2017 23:05:00 +0000 (01:05 +0200)
If in a record with an inline relation a new relation
is added and nothing else is changed the timestamp
was not updated.

The logic to update the timestamp has now been added
to the remapStack processing.

Change-Id: I2eae7d1fb54b21dddc6e3609b1585ba484980b06
Resolves: #82576
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/54423
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index ff269b5..89ba74b 100644 (file)
@@ -6158,7 +6158,11 @@ class DataHandler implements LoggerAwareInterface
                 }
                 // Update in database (list of children (csv) or number of relations (foreign_field)):
                 if (!empty($field)) {
-                    $this->updateDB($table, $id, [$field => $newValue]);
+                    $fieldArray = [$field => $newValue];
+                    if ($GLOBALS['TCA'][$table]['ctrl']['tstamp']) {
+                        $fieldArray[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
+                    }
+                    $this->updateDB($table, $id, $fieldArray);
                 } elseif (!empty($additionalData['flexFormId']) && !empty($additionalData['flexFormPath'])) {
                     // Collect data to update FlexForms
                     $flexFormId = $additionalData['flexFormId'];