system_rebuild_module_data
- Versions
- 7
system_rebuild_module_data()
Rebuild, save, and return data about all currently available modules.
Return value
Array of all available modules and their data.
Code
modules/system/system.module, line 2195
<?php
function system_rebuild_module_data() {
$modules = _system_rebuild_module_data();
ksort($modules);
system_get_files_database($modules, 'module');
system_update_files_database($modules, 'module');
// Refresh bootstrap status.
$bootstrap_modules = array();
foreach (bootstrap_hooks() as $hook) {
foreach (module_implements($hook) as $module) {
$bootstrap_modules[] = $module;
}
}
$query = db_update('system')->fields(array('bootstrap' => 0));
if ($bootstrap_modules) {
db_update('system')
->fields(array('bootstrap' => 1))
->condition('name', $bootstrap_modules, 'IN')
->execute();
$query->condition('name', $bootstrap_modules, 'NOT IN');
}
$query->execute();
$modules = _module_build_dependencies($modules);
return $modules;
}
?>Login or register to post comments 