Commit a8831c65 authored by Stefan Froemken's avatar Stefan Froemken Committed by Christian Kuhn
Browse files

[BUGFIX] Solve a then-else mismatch for foreign_label

I have changed then-part with else-part, because in
case of fields of type "inline" it is not possible
to have values like tx_table_123.

Resolves: #71002
Releases: master
Change-Id: Ib274b0f8b477001cabd4b681da505b6dde71f156
Reviewed-on: https://review.typo3.org/44265

Reviewed-by: default avatarRuud Silvrants <ruudsilvrants@gmail.com>
Reviewed-by: Sebastian Fischer's avatarSebastian Fischer <typo3@evoweb.de>
Tested-by: Sebastian Fischer's avatarSebastian Fischer <typo3@evoweb.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 90bfb31f
......@@ -333,19 +333,19 @@ class InlineRecordContainer extends AbstractContainer
$recTitle = $data['recordTitle'];
} elseif ($hasForeignLabel || $hasSymmetricLabel) {
$titleCol = $hasForeignLabel ? $config['foreign_label'] : $config['symmetric_label'];
// Render title for everything else than group/db:
// Render title for group/db:
if (isset($this->data['processedTca']['columns'][$titleCol]['config']['type'])
&& $this->data['processedTca']['columns'][$titleCol]['config']['type'] === 'group'
&& isset($this->data['processedTca']['columns'][$titleCol]['config']['internal_type'])
&& $this->data['processedTca']['columns'][$titleCol]['config']['internal_type'] === 'db'
) {
$recTitle = BackendUtility::getProcessedValueExtra($foreign_table, $titleCol, $rec[$titleCol], 0, 0, false);
} else {
// $recTitle could be something like: "tx_table_123|...",
$valueParts = GeneralUtility::trimExplode('|', $rec[$titleCol]);
$itemParts = GeneralUtility::revExplode('_', $valueParts[0], 2);
$recTemp = BackendUtility::getRecordWSOL($itemParts[0], $itemParts[1]);
$recTitle = BackendUtility::getRecordTitle($itemParts[0], $recTemp, false);
} else {
$recTitle = BackendUtility::getProcessedValueExtra($foreign_table, $titleCol, $rec[$titleCol], 0, 0, false);
}
$recTitle = BackendUtility::getRecordTitlePrep($recTitle);
if (trim($recTitle) === '') {
......
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