Topic: $next_extension_id elimination
$next_extension_id is stored in the {webroot}/installed_extensions.php file.
It is used in:
admin/inst_module.php
admin/db/maintenance_db.inc ---> writing to the installed_extensions file(s)
includes/packages.inc
index.php ----------------------------> set during install on CoAs
sql/alter2.3/php --------------------> updation of extension array elements
In general it is declared as a global variable from within functions and used and sometimes incremented. It is never decremented.
Actually it can be obtained by querying the $installed_extensions array and choosing to be one more than the highest key number or 1 if empty array.
This way we can make the array in each company (must make it a different name) have the same elements for the activated extensions.
Is this extension id stored in any FA table as a foreign key?