[TYPO3-core] RFC: Bug 4446 TCEmain: Hook processDatamap_afterDatabaseOperations and insert operations
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Wed Feb 7 15:51:38 CET 2007
Ingmar Schlecht schrieb:
> This is a SVN patch request.
>
> Type: Bugfix
> by Ingo Schmitt
>
> Description:
> When the hook processDatamap_afterDatabaseOperations is used after an
> INSERT operation not the new insert_id is given to the hook as $id but
> the temporary NEW...... ID.
>
> Solution:
> Sinve the function insertDB already returns the new insert_id, the new
> ID should be stored in $id, to have it availiabe in the hook.
>
> Remark:
> There is the slight probability of breaking backwards compatibility as
> people could have translated the NEW... id themselves in their hook
> functions using the $this->substNEWwithIDs array. However, it makes much
> more sense to directly pass the real insert id to the hook.
But that's the way with all TCEmain operations. If you need the new ids use
substNEWwithIDs.
It's not such an advantage that it's worth to break old stuff.
Masi
More information about the TYPO3-team-core
mailing list