Project

General

Profile

Bug #90841 » Update-tstamp-of-record-when-sorting-will-be-updated.diff

Jürgen Kußmann, 2020-03-26 13:27

View differences:

typo3/sysext/core/Classes/DataHandling/DataHandler.php
while ($row = $result->fetch()) {
$uid = (int)$row['uid'];
if ($uid) {
$connection->update($table, [$sortRow => $i], ['uid' => (int)$uid]);
/**
* Bugfix: Field 'tstamp' should also be updated, when sorting will be updated
*/
$updateFields = [$sortRow => $i];
if ($GLOBALS['TCA'][$table]['ctrl']['tstamp']) {
$updateFields[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
}
$connection->update($table, $updateFields, ['uid' => (int)$uid]);
// This is used to return a sortingValue if the list is resorted because of inserting records inside the list and not in the top
if ($uid == $return_SortNumber_After_This_Uid) {
$i = $i + $intervals;
    (1-1/1)