[BUGFIX] Create valid file reference index data 45/26645/2
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Tue, 10 Dec 2013 12:25:03 +0000 (13:25 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Thu, 16 Jan 2014 21:52:11 +0000 (22:52 +0100)
commit0965b223138349dc4f1e840ba6473171fa9f83ab
treec60462e7cb5c393ebd1f7cf7330b5d3d8f61dc2a
parentb7ce3effc6edd8a4f8a1fb1b343ff939dee2606e
[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/26645
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Configuration/TCA/sys_file_reference.php