[CLEANUP] Simplify updating of timestamp in writeForeignField
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Database / RelationHandler.php
index 2651b30..91fcbc8 100644 (file)
@@ -1150,21 +1150,7 @@ class RelationHandler
                 if (!empty($updateValues)) {
                     // Update tstamp if any foreign field value has changed
                     if (!empty($GLOBALS['TCA'][$table]['ctrl']['tstamp'])) {
                 if (!empty($updateValues)) {
                     // Update tstamp if any foreign field value has changed
                     if (!empty($GLOBALS['TCA'][$table]['ctrl']['tstamp'])) {
-                        $currentRow = BackendUtility::getRecord($table, $uid, implode(',', array_keys($updateValues)), '', true);
-                        $needTstampUpdate = false;
-                        if (empty($currentRow)) {
-                            $needTstampUpdate = true;
-                        } else {
-                            foreach ($currentRow as $field => $curValue) {
-                                if ((string)$curValue !== (string)$updateValues[$field]) {
-                                    $needTstampUpdate = true;
-                                    break;
-                                }
-                            }
-                        }
-                        if ($needTstampUpdate) {
-                            $updateValues[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
-                        }
+                        $updateValues[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                     }
                     $this->getConnectionForTableName($table)
                         ->update(
                     }
                     $this->getConnectionForTableName($table)
                         ->update(