Index: includes/theme.maintenance.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.maintenance.inc,v retrieving revision 1.16 diff -u -r1.16 theme.maintenance.inc --- includes/theme.maintenance.inc 21 Aug 2008 19:36:36 -0000 1.16 +++ includes/theme.maintenance.inc 4 Sep 2008 23:34:20 -0000 @@ -66,6 +66,7 @@ drupal_add_css(drupal_get_path('module', 'system') . '/system.css', 'module'); drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', 'module'); drupal_add_css(drupal_get_path('module', 'system') . '/maintenance.css', 'module'); + drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', 'module'); } /** Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.67 diff -u -r1.67 install.inc --- includes/install.inc 28 Aug 2008 08:40:33 -0000 1.67 +++ includes/install.inc 4 Sep 2008 23:34:18 -0000 @@ -222,11 +222,11 @@ foreach ($drivers as $driver => $file) { $class = 'DatabaseInstaller_' . $driver; $installer = new $class(); + if ($installer->installable()) { $databases[$driver] = $installer->name(); } } - // Usability: unconditionnally put the MySQL driver on top. if (isset($databases['mysql'])) { $mysql_database = $databases['mysql']; @@ -418,6 +418,24 @@ } /** + * Get a list of modules required by an installation profile. + * + * @param profile + * Name of profile. + * @param locale + * Name of locale used (if any). + * @return + * The list of modules to install. + */ +function drupal_profile_modules($profile, $locale = 'en') { + $profile_file = "./profiles/$profile/$profile.profile"; + require_once($profile_file); + // Get a list of modules required by this profile. + $function = $profile . '_profile_modules'; + return array_merge(drupal_required_modules(), $function(), ($locale != 'en' ? array('locale') : array())); +} + +/** * Verify a profile for installation. * * @param profile @@ -437,11 +455,7 @@ install_no_profile_error(); } - require_once($profile_file); - - // Get a list of modules required by this profile. - $function = $profile . '_profile_modules'; - $module_list = array_merge(drupal_required_modules(), $function(), ($locale != 'en' ? array('locale') : array())); + $module_list = drupal_profile_modules($profile, $locale); // Get a list of modules that exist in Drupal's assorted subdirectories. $present_modules = array(); @@ -451,14 +465,24 @@ // Verify that all of the profile's required modules are present. $missing_modules = array_diff($module_list, $present_modules); + + $requirements = array(); + if (count($missing_modules)) { + $modules = array(); foreach ($missing_modules as $module) { - drupal_set_message(st('The %module module is required but was not found. Please move it into the modules subdirectory.', array('%module' => $module)), 'error'); + $modules[] = '' . drupal_ucfirst($module) . ''; } + + $requirements['required_modules'] = array( + 'title' => st('Required modules'), + 'value' => st('Required modules not found.'), + 'severity' => REQUIREMENT_ERROR, + 'description' => st('The following modules are required but were not found. Please move them into the specific modules subdirectory. Missing modules: !modules', array('!modules' => implode(', ', $modules))), + ); } - else { - return $module_list; - } + + return $requirements; } /** Index: install.php =================================================================== RCS file: /cvs/drupal/drupal/install.php,v retrieving revision 1.127 diff -u -r1.127 install.php --- install.php 28 Aug 2008 08:40:32 -0000 1.127 +++ install.php 4 Sep 2008 23:34:12 -0000 @@ -117,17 +117,20 @@ } // Check the installation requirements for Drupal and this profile. - install_check_requirements($profile, $verify); + $requirements = install_check_requirements($profile, $verify); // Verify existence of all required modules. - $modules = drupal_verify_profile($profile, $install_locale); + $requirements += drupal_verify_profile($profile, $install_locale); - // If any error messages are set now, it means a requirement problem. - $messages = drupal_set_message(); - if (!empty($messages['error'])) { + // Check the severity of the requirements reported. + $severity = drupal_requirements_severity($requirements); + + if ($severity == REQUIREMENT_ERROR) { install_task_list('requirements'); drupal_set_title(st('Requirements problem')); - print theme('install_page', ''); + $status_report = theme('status_report', $requirements); + $status_report .= st('Please check the error messages and try again.', array('!url' => request_uri())); + print theme('install_page', $status_report); exit; } @@ -142,6 +145,7 @@ // Save the list of other modules to install for the 'profile-install' // task. variable_set() can be used now that system.module is installed // and drupal is bootstrapped. + $modules = drupal_profile_modules($profile, $install_locale); variable_set('install_profile_modules', array_diff($modules, array('system'))); } @@ -885,6 +889,8 @@ * Check installation requirements and report any errors. */ function install_check_requirements($profile, $verify) { + // Check the profile requirements. + $requirements = drupal_check_profile($profile); // If Drupal is not set up already, we need to create a settings file. if (!$verify) { @@ -904,48 +910,38 @@ $exists = TRUE; } } + + $requirements['settings file'] = array( + 'title' => st('Settings file'), + ); + if (!$exists) { - drupal_set_message(st('The @drupal installer requires that you create a settings file as part of the installation process. + $requirements['settings file'] += array( + 'value' => st('The settings file does not exist.'), + 'severity' => REQUIREMENT_ERROR, + 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process.