Skip to content
Snippets Groups Projects
Commit f3bb439e authored by Steffen Ritter's avatar Steffen Ritter Committed by Oliver Hader
Browse files

[BUGFIX] TS Object "FILES" is not able to handle multiple references

The current implementation is not able to deal with more
than one file-reference (hand over as csv).

According to the documentation and to behave like other
options of the FILES object this should be adapted.

Change-Id: I79227dcabbcc92c355528df0f8ebb7e4f38d1dcb
Fixes: #39955
Releases: 6.0
Reviewed-on: http://review.typo3.org/14307
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
parent 582ac42b
No related merge requests found
......@@ -55,9 +55,11 @@ class FilesContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractConte
references = 27
*/
$referencesUid = $this->stdWrapValue('references', $conf);
if ($referencesUid) {
$this->addToArray($fileRepository->findFileReferenceByUid($referencesUid), $fileObjects);
$referencesUidArray = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $referencesUid, TRUE);
foreach ($referencesUidArray as $referenceUid) {
$this->addToArray($fileRepository->findFileReferenceByUid($referenceUid), $fileObjects);
}
// It's important that this always stays "fieldName" and not be renamed to "field" as it would otherwise collide with the stdWrap key of that name
$referencesFieldName = $this->stdWrapValue('fieldName', $conf['references.']);
if ($referencesFieldName) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment