[BUGFIX] FAL: Fix inline labels for fields of type group 79/44979/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 27 Nov 2015 13:37:59 +0000 (14:37 +0100)
committerFrank Nägler <frank.naegler@typo3.org>
Mon, 30 Nov 2015 10:51:31 +0000 (11:51 +0100)
Properly extract the table and uid for the record from uid_local in case
of group type sources that use the table_uid|label syntax.

Resolves: #71887
Releases: master
Change-Id: I1a0b6d9798bf1d397d64c02f05e71978ee022a2c
Reviewed-on: https://review.typo3.org/44979
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/Resource/Service/UserFileInlineLabelService.php

index a263fe6..bb84d83 100644 (file)
@@ -41,7 +41,9 @@ class UserFileInlineLabelService
             return;
         }
 
-        $fileInfo = BackendUtility::splitTable_Uid($params['row']['uid_local'], 2);
+        // In case of a group field uid_local has the table_uid|label syntax
+        $tableAndUid = array_shift(GeneralUtility::trimExplode('|', $params['row']['uid_local'], true, 2));
+        $fileInfo = BackendUtility::splitTable_Uid($tableAndUid);
         $fileRecord = BackendUtility::getRecord($fileInfo[0], $fileInfo[1]);
 
         // Configuration