[TYPO3-core] RFC: update timestamp on delete

Wolfgang Klinger wolfgang at stufenlos.net
Mon Jan 16 08:56:10 CET 2006


 *hiya!*

 
 This is a CVS patch request.

 Type:
 feature

 Branches: TYPO3-4.0

 Description:
 Update the timestamp field (TCA/ctrl/tstamp) on delete, so it's
 possible for "trash" extensions to show the date on which a record was
 deleted (I can remember when I deleted something lately but not
 when that what's deleted has been changed IMHO).


 kind regards
 Wolfgang

-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_tcemain.php	2006-01-16 08:24:33.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_tcemain.php	2006-01-16 08:43:19.000000000 +0100
@@ -3033,6 +3033,10 @@
 						$deleteRow => 1
 					);
 
+					if ($TCA[$table]['ctrl']['tstamp']) {
+						$updateFields[$TCA[$table]['ctrl']['tstamp']] = time();
+					}
+
 						// If the table is sorted, then the sorting number is set very high
 					if ($TCA[$table]['ctrl']['sortby'])	{
 						$updateFields[$TCA[$table]['ctrl']['sortby']] = 1000000000;



More information about the TYPO3-team-core mailing list