[FOLLOWUP][BUGFIX] Allow file:// links in Element Browser 78/37378/3
authorNicole Cordes <typo3@cordes.co>
Sat, 28 Feb 2015 19:19:43 +0000 (20:19 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 28 Feb 2015 21:06:08 +0000 (22:06 +0100)
This patch allows the use of links with file scheme in typolink().

Releases: master, 6.2
Resolves: #65358
Change-Id: I25a8ca88637d1ecab4881127cf2228214b6c954a
Reviewed-on: http://review.typo3.org/37378
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index e491dc7..be22890 100644 (file)
@@ -5772,7 +5772,7 @@ class ContentObjectRenderer {
                                }
                        }
                        // Resolve FAL-api "file:UID-of-sys_file-record" and "file:combined-identifier"
-                       if ($linkHandlerKeyword === 'file') {
+                       if ($linkHandlerKeyword === 'file' && !GeneralUtility::isFirstPartOfStr($link_paramA[0], 'file://')) {
                                try {
                                        $fileOrFolderObject = $this->getResourceFactory()->retrieveFileOrFolderObject($linkHandlerValue);
                                        // Link to a folder or file