[BUGFIX] Prevent wrong ref_index for fields with soft references 16/37016/5
authorNicole Cordes <typo3@cordes.co>
Thu, 19 Feb 2015 09:55:13 +0000 (10:55 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 21 Feb 2015 19:01:48 +0000 (20:01 +0100)
commit7dfd4607ab7e54e54b4bf710cff1e8e690cd6a67
treeb408bc5b136473dc4a5d7a24eaa4e46df115dc1a
parent04c6d48ac7f3889869c8541aac48d7ca6ca8e30d
[BUGFIX] Prevent wrong ref_index for fields with soft references

If you add a page link to a field which is defined as softrefs, the
ReferenceIndex creates an index to a FAL record if there exists a file
record with the page id. As file links are always prefixed with 'file:'
this patch adds a proper check before generating a file ref_index.

Furthermore if you add a file or folder link, the field is referenced
twice for the FAL record. So we have to suppress the softreference for
those records.

Releases: master, 6.2
Resolves: #60226
Change-Id: Ieb9179d393e23eda4fdb1bb47ba4693bd92e75d9
Reviewed-on: http://review.typo3.org/37016
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Database/ReferenceIndex.php