[BUGFIX] Show fieldname if fieldtitle is empty
authorTolleiv Nietsch <info@tolleiv.de>
Fri, 4 Mar 2011 15:11:07 +0000 (10:11 -0500)
committerTolleiv Nietsch <info@tolleiv.de>
Fri, 4 Mar 2011 15:11:07 +0000 (10:11 -0500)
Change-Id: Ie609e843031b6bfeb525b364cd401857b6fbf8c3
Resolves: #13480

typo3/sysext/workspaces/Classes/ExtDirect/Server.php

index f6b4607..c7a69bf 100644 (file)
@@ -109,7 +109,11 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
                                        $liveRecord[$fieldName] = t3lib_BEfunc::getProcessedValue($parameter->table,$fieldName,$liveRecord[$fieldName],0,1);
                                        $versionRecord[$fieldName] = t3lib_BEfunc::getProcessedValue($parameter->table,$fieldName,$versionRecord[$fieldName],0,1);
 
+                                               // Get the field's label. If not available, use the field name
                                        $fieldTitle = $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($parameter->table, $fieldName));
+                                       if (empty($fieldTitle)) {
+                                               $fieldTitle = $fieldName;
+                                       }
 
                                        if ($TCA[$parameter->table]['columns'][$fieldName]['config']['type'] == 'group' && $TCA[$parameter->table]['columns'][$fieldName]['config']['internal_type'] == 'file') {
                                                $versionThumb = t3lib_BEfunc::thumbCode($versionRecord, $parameter->table, $fieldName, '');