Skip to content
Snippets Groups Projects
Commit 178f336b authored by Torben Hansen's avatar Torben Hansen Committed by Christian Kuhn
Browse files

[TASK] Consider soft delete in file reference delete method

With #102770 the `delete()` method for a FileReference object has
been implemented. This was however performed using a hard delete
of the file reference record in the database, which is not
appropriate, since the delete functionality must take into account,
if the table is configured for soft or hard deletes.

This patch changes the implementation, so the file reference is
either hard or soft deleted depending on the TCA configuration.
If the delete operation was successful, the reference index
for affected records is now updated. Additionally, functional
tests are extended to ensure, that the file used in the file
reference remains when the file reference is deleted and that
the reference index is updated accordingly.

Resolves: #102785
Related: #102770
Releases: main, 12.4
Change-Id: I43beb066c2259441aa2ed7e3fba0e242b7d8fbbb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85516


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 070694a4
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment