diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 05:08:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 05:08:29 +0000 |
commit | c33d0f7be84eef3f3cd3a6d4855fc315adb3c554 (patch) | |
tree | 27a517956cb20111ff78a14bc725a62464affe0a /includes/install.inc | |
parent | 3a0f6b33720b1a939ec2f828bfefd31b6c51817f (diff) | |
download | brdo-c33d0f7be84eef3f3cd3a6d4855fc315adb3c554.tar.gz brdo-c33d0f7be84eef3f3cd3a6d4855fc315adb3c554.tar.bz2 |
#399642 follow-up by carlos8f: Replace drupal_install_modules() with an improved module_enable().
Diffstat (limited to 'includes/install.inc')
-rw-r--r-- | includes/install.inc | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/includes/install.inc b/includes/install.inc index 6f876b2c3..d1496fcbd 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -536,52 +536,6 @@ function drupal_verify_profile($install_state) { } /** - * Calls the install function for a given list of modules. - * - * @param $module_list - * The modules to install. - * @param $disable_modules_installed_hook - * Normally just testing wants to set this to TRUE. - * - * @return - * TRUE if installation was attempted, FALSE if one or more dependencies are - * missing. - */ -function drupal_install_modules($module_list = array(), $disable_modules_installed_hook = FALSE) { - $files = system_rebuild_module_data(); - $module_list = array_flip(array_values($module_list)); - do { - $moved = FALSE; - foreach ($module_list as $module => $weight) { - $file = $files[$module]; - if (isset($file->info['dependencies']) && is_array($file->info['dependencies'])) { - foreach ($file->info['dependencies'] as $dependency) { - if (!isset($module_list[$dependency])) { - if (!isset($files[$dependency])) { - // A dependency was not found, abort installation. - return FALSE; - } - elseif (!$files[$dependency]->status) { - // Add dependencies to $module_list and install them first. - $module_list[$dependency] = $weight - 1; - $moved = TRUE; - } - } - elseif ($module_list[$module] < $module_list[$dependency] +1) { - $module_list[$module] = $module_list[$dependency] +1; - $moved = TRUE; - } - } - } - } - } while ($moved); - asort($module_list); - $module_list = array_keys($module_list); - module_enable($module_list, $disable_modules_installed_hook); - return TRUE; -} - -/** * Callback to install an individual install profile module. * * Used during installation to install modules one at a time and then |