From 00fa1cd5c876406952d655592b804f4333c42191 Mon Sep 17 00:00:00 2001 From: Sascha Nowak <sascha.nowak@netlogix.de> Date: Mon, 2 Jan 2017 11:59:58 +0100 Subject: [PATCH] [FOLLOWUP][BUGFIX] Hide language switcher if record has no default translation In the current implementation it is not possible to create a new translations outside of the default translation. So we can readd the new translation option when the record has a default translation. Change-Id: I89c4200ff847dadfdeec03b5f43a6577f40702e3 Resolves: #72797 Releases: master, 7.6 Reviewed-on: https://review.typo3.org/51092 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Andreas Fernandez <typo3@scripting-base.de> Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de> Reviewed-by: Josef Glatz <josef.glatz@typo3.org> Tested-by: Josef Glatz <josef.glatz@typo3.org> Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com> Tested-by: Alexander Opitz <opitz.alexander@googlemail.com> --- .../backend/Classes/Controller/EditDocumentController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php index ce98bded14b2..452cda5a7427 100644 --- a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php +++ b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php @@ -1623,7 +1623,7 @@ class EditDocumentController extends AbstractModule 'returnUrl' => $this->retUrl ]); - if ($currentLanguage === 0) { + if (array_key_exists(0, $rowsByLang)) { $href = BackendUtility::getLinkToDataHandlerAction( '&cmd[' . $table . '][' . $rowsByLang[0]['uid'] . '][localize]=' . $lang['uid'], $redirectUrl -- GitLab