[TYPO3-bugs] RFC: Bug 4446 tcemain: Hook processDatamap_afterDatabaseOperations and insert operations
Ingmar Schlecht
ingmar at typo3.org
Wed Feb 7 14:32:19 CET 2007
Hi Ingo
thanks for the patch!
Here's what I sent to the core list (watch the "Remark" below):
----------------------------------------------------------------------
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.
Branches: Trunk only.
Bugtracker reference:
http://bugs.typo3.org/view.php?id=4446
cheers
Ingmar
----------------------------------------------------------------------
Ingo Schmitt schrieb:
> Type: Bugfix
>
> Description:
> When using the hook processDatamap_afterDatabaseOperations to execute
> your own code after the database operation, not the new insert_id ist
> given to the hook, but the temporarily ID NEW...... . So you can't refer
> to this new id.
>
> Sinve insertDB already returns the new insert_id, the new ID should be
> stored in $id, to have it availiabe in the hook.
>
> Branches: 4.0.4, 4.1 Beta 3
>
> Patch is attached to:
> http://bugs.typo3.org/view.php?id=4446
>
>
> Regards
>
> ingo
>
>
>
> Mit freundlichen Gruessen
--
Want to know about latest core development? Subscribe to the core list!
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
More information about the TYPO3-team-bugs
mailing list