Commit 781235a5 authored by Dries's avatar Dries

- Patch #108272 by webchick, Ralf et al: improved handling of required modules in install profiles.

parent 49803271
......@@ -272,7 +272,7 @@ function drupal_verify_profile($profile, $locale) {
// Get a list of modules required by this profile.
$function = $profile .'_profile_modules';
$module_list = array_merge(array('system'), $function(), ($locale ? array('locale') : array()));
$module_list = array_merge(drupal_required_modules(), $function(), ($locale ? array('locale') : array()));
// Get a list of modules that exist in Drupal's assorted subdirectories.
$present_modules = array();
......@@ -687,7 +687,7 @@ function drupal_check_profile($profile) {
// Get a list of modules required by this profile.
$function = $profile .'_profile_modules';
$module_list = array_unique(array_merge(array('system'), $function()));
$module_list = array_unique(array_merge(drupal_required_modules(), $function()));
// Get a list of all .install files.
$installs = drupal_get_install_files($module_list);
......
......@@ -419,4 +419,9 @@ function module_invoke_all() {
* @} End of "defgroup hooks".
*/
/**
* Array of modules required by core.
*/
function drupal_required_modules() {
return array('block', 'filter', 'node', 'system', 'user', 'watchdog');
}
......@@ -1313,8 +1313,7 @@ function system_modules($form_values = NULL) {
}
// Merge in required modules.
$modules_required = array('block', 'filter', 'node', 'system', 'user', 'watchdog');
foreach ($modules_required as $required) {
foreach (drupal_required_modules() as $required) {
$disabled[] = $required;
$form['disabled_modules']['#value'][$required] = TRUE;
}
......
......@@ -8,7 +8,7 @@
* An array of modules to be enabled.
*/
function default_profile_modules() {
return array('block', 'color', 'comment', 'filter', 'help', 'node', 'system', 'taxonomy', 'user', 'watchdog');
return array('color', 'comment', 'help', 'taxonomy');
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment