[FOLLOWUP][BUGFIX] Prevent wrong ref_index for fields with soft references 75/37375/2
authorNicole Cordes <typo3@cordes.co>
Sat, 28 Feb 2015 20:34:25 +0000 (21:34 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 28 Feb 2015 20:45:05 +0000 (21:45 +0100)
This patch resolved failing functional tests.

Releases: 6.2
Resolves: #65421
Change-Id: I1500cd766aa74199601dc74a4b82f255f4aa5067
Reviewed-on: http://review.typo3.org/37375
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Database/ReferenceIndex.php

index 16cafe8..1e5e102 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Database;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\StringUtility;
 
 /**
  * Reference index processing and relation extraction
@@ -622,7 +621,7 @@ class ReferenceIndex {
                                $fileArray[] = array('table' => 'sys_file', 'id' => $fileUid['uid_local']);
                        }
                        return $fileArray;
-               } elseif ($conf['type'] == 'input' && isset($conf['wizards']['link']) && StringUtility::beginsWith($value, 'file:')) {
+               } elseif ($conf['type'] == 'input' && isset($conf['wizards']['link']) && GeneralUtility::isFirstPartOfStr($value, 'file:')) {
                        try {
                                $file = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($value);
                        } catch (\Exception $e) {