You are here

function drupal_install_modules in Drupal 5

Same name and namespace in other branches
  1. 6 includes/install.inc \drupal_install_modules()

Calls the install function and updates the system table for a given list of modules.

Parameters

module_list: The modules to install.

2 calls to drupal_install_modules()
drupal_install_profile in includes/install.inc
Install a profile (i.e. a set of modules) from scratch. The profile must be verified first using drupal_verify_profile().
system_modules_submit in modules/system/system.module
Submit callback; handles modules form submission.

File

includes/install.inc, line 338

Code

function drupal_install_modules($module_list = array()) {
  $enable_modules = array();
  foreach ($module_list as $module) {
    if (drupal_get_installed_schema_version($module, TRUE) == SCHEMA_UNINSTALLED) {
      module_load_install($module);
      module_invoke($module, 'install');
      $versions = drupal_get_schema_versions($module);
      drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
      $enable_modules[] = $module;
    }
  }
  module_enable($enable_modules);
}