summaryrefslogtreecommitdiff
path: root/includes/install.core.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-04 01:54:37 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-04 01:54:37 +0000
commita066c69b9c6bf4522278e1a79a47362276db1a42 (patch)
treee76411088ae770cdd7451ed347a29163f6204678 /includes/install.core.inc
parentaf8882e9736356820db8e6a59f68a362cca313b2 (diff)
downloadbrdo-a066c69b9c6bf4522278e1a79a47362276db1a42.tar.gz
brdo-a066c69b9c6bf4522278e1a79a47362276db1a42.tar.bz2
#534556 by karschp, coltrane, Bojhan, David_Rothstein: Fix double appearance of the settings.php message in the installer
Diffstat (limited to 'includes/install.core.inc')
-rw-r--r--includes/install.core.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/install.core.inc b/includes/install.core.inc
index 6a8c6f440..740c1b421 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -1410,12 +1410,16 @@ function install_configure_form($form, &$form_state, &$install_state) {
// Warn about settings.php permissions risk
$settings_dir = conf_path();
$settings_file = $settings_dir . '/settings.php';
- if (!drupal_verify_install_file(DRUPAL_ROOT . '/' . $settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE) || !drupal_verify_install_file(DRUPAL_ROOT . '/' . $settings_dir, FILE_NOT_WRITABLE, 'dir')) {
+ // Check that $_POST is empty so we only show this message when the form is
+ // first displayed, not on the next page after it is submitted. (We do not
+ // want to repeat it multiple times because it is a general warning that is
+ // not related to the rest of the installation process; it would also be
+ // especially out of place on the last page of the installer, where it would
+ // distract from the message that the Drupal installation has completed
+ // successfully.)
+ if (empty($_POST) && (!drupal_verify_install_file(DRUPAL_ROOT . '/' . $settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE) || !drupal_verify_install_file(DRUPAL_ROOT . '/' . $settings_dir, FILE_NOT_WRITABLE, 'dir'))) {
drupal_set_message(st('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, consult the <a href="@handbook_url">online handbook</a>.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/server-permissions')), 'warning');
}
- else {
- drupal_set_message(st('All necessary changes to %dir and %file have been made. They have been set to read-only for security.', array('%dir' => $settings_dir, '%file' => $settings_file)));
- }
drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
// Add JavaScript time zone detection.