Commit b4bfa8e9 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[FOLLOWUP][BUGFIX] Remove hardcoded hidden column

Use processedTca instead of $GLOBALS access and improve
validation to avoid notice level errors.

Change-Id: I9f2f2a455875e509c16cad17e29e629e8b21fe6d
Resolves: #75647
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/47892

Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarSusanne Moog <typo3@susannemoog.de>
Tested-by: default avatarSusanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 4192281b
......@@ -127,7 +127,10 @@ class InlineRecordContainer extends AbstractContainer
$html = '';
$combinationHtml = '';
$isNewRecord = $data['command'] === 'new';
$hiddenField = $GLOBALS['TCA'][$foreignTable]['ctrl']['enablecolumns']['disabled'];
$hiddenField = '';
if (isset($data['processedTca']['ctrl']['enablecolumns']['disabled'])) {
$hiddenField = $data['processedTca']['ctrl']['enablecolumns']['disabled'];
}
if (!$data['isInlineDefaultLanguageRecordInLocalizedParentContext']) {
if ($isNewRecord || $data['isInlineChildExpanded']) {
// Render full content ONLY IF this is an AJAX request, a new record, or the record is not collapsed
......@@ -181,7 +184,7 @@ class InlineRecordContainer extends AbstractContainer
if ($data['isInlineDefaultLanguageRecordInLocalizedParentContext']) {
$class .= ' t3-form-field-container-inline-placeHolder';
}
if (isset($record[$hiddenField]) && (int)$record[$hiddenField]) {
if (!empty($hiddenField) && isset($record[$hiddenField]) && (int)$record[$hiddenField]) {
$class .= ' t3-form-field-container-inline-hidden';
}
$class .= ($isNewRecord ? ' inlineIsNewRecord' : '');
......
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