- Patch #92923 by webchick: made the installer more robust to missing modules.

5.x
Dries Buytaert 2006-11-08 19:21:07 +00:00
parent 342f95d451
commit 04037a5011
1 changed files with 18 additions and 1 deletions

View File

@ -73,8 +73,13 @@ function install_main() {
install_change_settings($profile, $install_locale);
}
// Perform actual installation defined in the profile.
// Verify existence of all required modules.
$modules = drupal_verify_profile($profile, $install_locale);
if (!$modules) {
install_missing_modules_error($profile);
}
// Perform actual installation defined in the profile.
drupal_install_profile($profile, $modules);
// Warn about settings.php permissions risk
@ -498,6 +503,18 @@ function install_already_done_error() {
exit;
}
/**
* Show an error page when Drupal is missing required modules.
*/
function install_missing_modules_error($profile) {
global $base_url;
drupal_maintenance_theme();
drupal_set_title(st('Modules missing'));
print theme('install_page', '<p>'. st('One or more required modules are missing. Please check the error messages and <a href="!url">try again</a>.', array('!url' => "install.php?profile=$profile")) .'</p>');
exit;
}
/**
* Page displayed when the installation is complete. Called from install.php.
*/