diff options
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 19 |
1 files changed, 18 insertions, 1 deletions
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 @@ -499,6 +504,18 @@ function install_already_done_error() { } /** + * 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. */ function install_complete($profile) { |