summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-11-08 19:21:07 +0000
committerDries Buytaert <dries@buytaert.net>2006-11-08 19:21:07 +0000
commit04037a501164f92e534c1cf0ef07c90685a9eb3d (patch)
tree47d5311969a571e2591ab9fb7c42b5713f55ca31 /install.php
parent342f95d4512d1f4562e1a6e64014b4cc8cb27f96 (diff)
downloadbrdo-04037a501164f92e534c1cf0ef07c90685a9eb3d.tar.gz
brdo-04037a501164f92e534c1cf0ef07c90685a9eb3d.tar.bz2
- Patch #92923 by webchick: made the installer more robust to missing modules.
Diffstat (limited to 'install.php')
-rw-r--r--install.php19
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) {