From 04037a501164f92e534c1cf0ef07c90685a9eb3d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 8 Nov 2006 19:21:07 +0000 Subject: - Patch #92923 by webchick: made the installer more robust to missing modules. --- install.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'install.php') diff --git a/install.php b/install.php index 2a7fefdc6..0d480968f 100644 --- a/install.php +++ b/install.php @@ -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', '

'. st('One or more required modules are missing. Please check the error messages and try again.', array('!url' => "install.php?profile=$profile")) .'

'); + exit; +} + /** * Page displayed when the installation is complete. Called from install.php. */ -- cgit v1.2.3