Skip to content
Snippets Groups Projects
Commit bf6ee546 authored by Łukasz Uznański's avatar Łukasz Uznański Committed by Christian Kuhn
Browse files

[BUGFIX] Disable edit of file metadata without translation

This avoids an error in case file metadata is edited through a file
reference and there is no file metadata translation for the current
language.

Resolves: #76262
Resolves: #82178
Releases: master, 8.7
Change-Id: Ifecf659637773c5f3773fc3439b09df9c030cb3f
Reviewed-on: https://review.typo3.org/54778


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 5be3ec13
Branches
Tags
No related merge requests found
......@@ -495,7 +495,7 @@ class InlineRecordContainer extends AbstractContainer
</a>';
}
// "Edit" link:
if (($rec['table_local'] === 'sys_file') && !$isNewItem) {
if (($rec['table_local'] === 'sys_file') && !$isNewItem && $backendUser->check('tables_modify', 'sys_file_metadata')) {
$sys_language_uid = 0;
if (!empty($rec['sys_language_uid'])) {
$sys_language_uid = $rec['sys_language_uid'][0];
......@@ -518,7 +518,7 @@ class InlineRecordContainer extends AbstractContainer
->setMaxResults(1)
->execute()
->fetch();
if ($backendUser->check('tables_modify', 'sys_file_metadata')) {
if (!empty($recordInDatabase)) {
$url = BackendUtility::getModuleUrl('record_edit', [
'edit[sys_file_metadata][' . (int)$recordInDatabase['uid'] . ']' => 'edit',
'returnUrl' => $this->data['returnUrl']
......
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