Commit e9c190bf authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Restore record date fields for all users

Prior to the introduction of the column selector
in #84184, did a boolean flag "$addDateFields"
define whether record date fields (tstamp and
crdate) should be added to the available field list.

Actually, those fields were always added, because
all usages of the corresponding method set either
"$addDateFields" or "$dontCheckUser" to TRUE.

This fact is now restored by always adding the
mentioned fields.

Resolves: #98574
Related: #84184
Releases: main, 11.5
Change-Id: I4f212aaf62d9dec26530f6f7a39f1135d684d015
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77568


Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 92b8a70a
......@@ -3424,14 +3424,16 @@ class BackendUtility
$fieldList[] = 'uid';
$fieldList[] = 'pid';
// Add more special fields (e.g. date fields) if user should not be checked or is admin
// Add date fields - if defined for the table
if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'] ?? false) {
$fieldList[] = $GLOBALS['TCA'][$table]['ctrl']['tstamp'];
}
if ($GLOBALS['TCA'][$table]['ctrl']['crdate'] ?? false) {
$fieldList[] = $GLOBALS['TCA'][$table]['ctrl']['crdate'];
}
// Add more special fields in case user should not be checked or is admin
if (!$checkUserAccess || $backendUser->isAdmin()) {
if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'] ?? false) {
$fieldList[] = $GLOBALS['TCA'][$table]['ctrl']['tstamp'];
}
if ($GLOBALS['TCA'][$table]['ctrl']['crdate'] ?? false) {
$fieldList[] = $GLOBALS['TCA'][$table]['ctrl']['crdate'];
}
if ($GLOBALS['TCA'][$table]['ctrl']['sortby'] ?? false) {
$fieldList[] = $GLOBALS['TCA'][$table]['ctrl']['sortby'];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment