[FOLLOWUP][BUGFIX] Hide language switcher if record has no default translation 05/51805/2
authorSascha Nowak <sascha.nowak@netlogix.de>
Mon, 2 Jan 2017 10:59:58 +0000 (11:59 +0100)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Thu, 23 Feb 2017 15:05:15 +0000 (16:05 +0100)
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>
(cherry picked from commit 00fa1cd5c876406952d655592b804f4333c42191)
Reviewed-on: https://review.typo3.org/51805

typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index 40a4a2c..eb7df29 100644 (file)
@@ -1649,7 +1649,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