[BUGFIX] IRRE translation links shouldn't be shown if no parent
authorGeorg Ringer <mail@ringerge.org>
Fri, 25 Nov 2011 06:45:13 +0000 (07:45 +0100)
committerGeorg Ringer <mail@ringerge.org>
Sun, 12 Feb 2012 10:11:06 +0000 (11:11 +0100)
IRRE provides some links like "localize records" or "synchronize with
original language" which is great but those links should not be
shown if a record got no parent record

Change-Id: I53d2bd3edd1b8126fae83b370c3ade58e8670818
Fixes: #32073
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/8898
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
t3lib/class.t3lib_tceforms_inline.php

index a4d8a66..67b1d66 100644 (file)
@@ -235,7 +235,8 @@ class t3lib_TCEforms_inline {
                        // Render the level links (create new record, localize all, synchronize):
                if ($config['appearance']['levelLinksPosition'] != 'none') {
                        $levelLinks = $this->getLevelInteractionLink('newRecord', $nameObject . self::Structure_Separator . $foreign_table, $config);
-                       if ($language > 0) {
+
+                       if ($language > 0 && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] > 0) {
                                        // Add the "Localize all records" link before all child records:
                                if (isset($config['appearance']['showAllLocalizationLink']) && $config['appearance']['showAllLocalizationLink']) {
                                        $levelLinks .= $this->getLevelInteractionLink('localize', $nameObject . self::Structure_Separator . $foreign_table, $config);