API to retrieve the newly created entity ID
authorAlexey Andriyanov <alan@al-an.info>
Thu, 6 Mar 2014 16:40:28 +0000 (20:40 +0400)
committerAlexey Andriyanov <alan@al-an.info>
Thu, 6 Mar 2014 16:40:28 +0000 (20:40 +0400)
commitfdd1a23a1cbfab4ff69c32392280be029b51dcd9
treec677818c24322f196319cbc7d45fa276bc270d9b
parent0d98dc5f8a395b60c2db463bcbbc9e4a9cada6e3
API to retrieve the newly created entity ID

When you implement a plugin that need to process the newly created
entity (by chaining after the original ophandler), you need to know the
entity id. lastInsertID() is not a choise since there may be multiple
inserts to different tables in the original ophandler.

lastCreated: new function to track or return the last created IDs
getLastCreatedId: wrapper around lastCreated(), filtering the last
created ID of a given realm.

these functions changed to call lastCreated():
commitAddObject
commitAddPort
commitCreateUserAccount
createIPv4Prefix
createIPv6Prefix
addVService
addVSG
createVLANDomain
addRStoRSPool
commitCreateRSPool
tableHandler
wwwroot/inc/database.php
wwwroot/inc/functions.php
wwwroot/inc/ophandlers.php
wwwroot/inc/slb.php