On Mon, Dec 12, 2011 at 11:23 PM, Eric W. Bates ericx@ericx.net wrote:
I'm sure this question has been asked, but I can't seem to phrase my Google query to find it.
Where do the files listed in a module's .info file get loaded in Drupal 7?
The list gets written into the 'system' table's 'info' field; but I can't figure out when/where list gets pulled and the files get loaded.
It's loaded at _system_rebuild_module_data from core system module. This is called by update_verify_update_archive at the core update module, which implements hook_verify_update_archive.
hook_verify_update_archive is called from update_manager_archive_verify.
This method is called from:
a) update_manager_install_form_submit. b) update_manager_batch_project_get, called by update_manager_update_form_submit.
Those are called from a) $module_path . '/install' b) $module_path . '/update'
So you can see that they are read when you try to install or update a module.
PS: Of course, if any of those methods are called from non-core code, they will trigger the read of the files section of the .info files. P.e. drush_get_modules at drush calls system_rebuild_module_data You can find references to system_rebuild_module_data in core at help.module, field module... and in contrib files like coder or features.
Hope this helps.
Thanks for your time.
[ Drupal support list | http://lists.drupal.org/ ]