[BUGFIX] Create valid file reference index data 76/25476/4
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Tue, 10 Dec 2013 12:25:03 +0000 (13:25 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 14 Dec 2013 08:47:59 +0000 (09:47 +0100)
commitf2e37267a284807593ef762e82bd52ea64647501
tree81e6a68ec758df3407ad5a4843c30a8cb3050a6d
parent77fd61d1efdb9dc8ace8b42ad0dd3d135ab8d671
[BUGFIX] Create valid file reference index data

This patch prevents the creation of sys_refindex entries that point to no
table and no record.

Additionally it fixes the array structure for the creation of
sys_refindex records for sys_file relations.

For deleted file references no reference will be created between
sys_file and the referenced table.

The configuration for the uid_foreign field was changed from a select
field for tt_content records to a normal input field to prevent the
creation of invalid refindex data. To which table uid_foreign is
pointing depends on the tablenames field.

To make sure both sides of the relation of a sys_file_reference appear
in the refindex table the exclusion of sys_file_reference as
foreign_table is removed.

Resolves: #53712
Releases: 6.2, 6.1, 6.0
Change-Id: Ic864ade10e4e97fbd9017b9c779be68d911dd626
Reviewed-on: https://review.typo3.org/25476
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Configuration/TCA/sys_file_reference.php