summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2010-06-04 09:18:15 (GMT)
committerDries Buytaert2010-06-04 09:18:15 (GMT)
commit3cef673eecb6b868aa1e379fd34e4962b6ce427e (patch)
tree206a96839acded323b393a39b9891cb449ece21a
parent6f03daf8d46f5b85b6972a1ca7abc754ee89035f (diff)
- Patch #312144 by CorniI, dropcube, EvanDonovan, Damien Tournoud, David_Rothstein, tstoeckler: install fails when default.settings.php is not present.
-rw-r--r--includes/install.core.inc16
1 files changed, 15 insertions, 1 deletions
diff --git a/includes/install.core.inc b/includes/install.core.inc
index 0e4cefe..552520e 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -1531,6 +1531,7 @@ function install_check_requirements($install_state) {
$writable = FALSE;
$conf_path = './' . conf_path(FALSE, TRUE);
$settings_file = $conf_path . '/settings.php';
+ $default_settings_file = './sites/default/default.settings.php';
$file = $conf_path;
$exists = FALSE;
// Verify that the directory exists.
@@ -1545,12 +1546,24 @@ function install_check_requirements($install_state) {
}
}
+ // If default.settings.php does not exist, or is not readable, throw an
+ // error.
+ if (!drupal_verify_install_file($default_settings_file, FILE_EXIST|FILE_READABLE)) {
+ $requirements['default settings file exists'] = array(
+ 'title' => st('Default settings file'),
+ 'value' => st('The default settings file does not exist.'),
+ 'severity' => REQUIREMENT_ERROR,
+ 'description' => st('The @drupal installer requires that the %default-file file not be modified in any way from the original download.', array('@drupal' => drupal_install_profile_distribution_name(), '%default-file' => $default_settings_file)),
+ );
+ }
+
+ // If settings.php does not exist, throw an error.
if (!$exists) {
$requirements['settings file exists'] = array(
'title' => st('Settings file'),
'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. Copy the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $conf_path . '/default.settings.php', '@install_txt' => base_path() . 'INSTALL.txt')),
+ 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'INSTALL.txt')),
);
}
else {
@@ -1558,6 +1571,7 @@ function install_check_requirements($install_state) {
'title' => st('Settings file'),
'value' => st('The %file file exists.', array('%file' => $file)),
);
+ // If settings.php is not writable, throw an error.
if (!$writable) {
$requirements['settings file writable'] = array(
'title' => st('Settings file'),