Commit 715d2c47 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Add missing checks for translate keys in compare view

The compare view of EXT:beuser does a couple
of f:translate calls with dynamic values as key.
Since some of those calls did not properly check
the provided key, before passing it to the view
helper, this previously led to exceptions.

This is now fixed by properly checking the
key, before passing it to the f:translate
view helper. Additionally, some defaults
are added to support static labels.

Resolves: #94202
Releases: master, 11.5
Change-Id: Iff14f7c3b17108288227b108b5005d28611e20a8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72248

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: David Menzel's avatarDavid Menzel <foxxdav@yahoo.de>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: David Menzel's avatarDavid Menzel <foxxdav@yahoo.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent e52196de
......@@ -91,7 +91,12 @@
<f:for each="{fileFolderPermissions}" as="item">
<tr>
<td class="col-icon"><core:icon identifier="{item.2}"/></td>
<td class="col-title">{f:translate(key:item.0,default:item.1)}</td>
<td class="col-title">
<f:if condition="{item.0}">
<f:then>{f:translate(key:item.0,default:item.0)}</f:then>
<f:else>{item.1}</f:else>
</f:if>
</td>
</tr>
</f:for>
</table>
......@@ -133,7 +138,9 @@
<f:for each="{pageTypes}" as="item">
<tr>
<td class="col-icon"><core:icon identifier="{item.icon}"/></td>
<td class="col-title">{f:translate(key:item.label,default:item.label)}</td>
<td class="col-title">
<f:if condition="{item.label}">{f:translate(key:item.label,default:item.label)}</f:if>
</td>
</tr>
</f:for>
</table>
......@@ -181,7 +188,7 @@
<f:for each="{tables.all}" key="table" as="label">
<tr>
<td class="col-title col-responsive nowrap">
<f:if condition="{label}">{f:translate(key:label)}</f:if> [{table}]
<f:if condition="{label}">{f:translate(key:label,default:label)}</f:if> [{table}]
</td>
<td class="text-center">
<bu:display.tableAccess table="{table}" select="{tables.tables_select}" modify="{tables.tables_modify}">
......@@ -211,14 +218,13 @@
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="{tableName}-{id}-heading">
<a data-bs-toggle="collapse" title="{item.linkTitle}" href="#{tableName}-{id}" aria-expanded="false" aria-controls="{tableName}-{id}">
<f:if condition="{table.label}">{f:translate(key:table.label)}</f:if> [{tableName}]
<f:if condition="{table.label}">{f:translate(key:table.label,default:table.label)}</f:if> [{tableName}]
</a>
</div>
<div id="{tableName}-{id}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{tableName}-{id}-heading">
<div class="panel-body">
<f:for each="{table.fields}" as="label" key="field">
{f:translate(key:label)}
[{field}]<br>
<f:if condition="{label}">{f:translate(key:label,default:label)}</f:if> [{field}]<br>
</f:for>
</div>
</div>
......
Markdown is supported
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