_drupal_install_module
- Versions
- 6 – 7
_drupal_install_module($module)
Callback to install an individual install profile module.
Used during installation to install modules one at a time and then enable them, or to install a number of modules at one time from admin/config/modules.
Parameters
$module The machine name of the module to install.
Return value
TRUE if the module got installed.
Code
includes/install.inc, line 594
<?php
function _drupal_install_module($module) {
if (drupal_get_installed_schema_version($module, TRUE) == SCHEMA_UNINSTALLED) {
drupal_load('module', $module);
drupal_install_schema($module);
// Now allow the module to perform install tasks.
module_invoke($module, 'install');
$versions = drupal_get_schema_versions($module);
drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
system_list_reset();
return TRUE;
}
}
?>Login or register to post comments 