Commit 268c4f20 authored by alexpott's avatar alexpott

Issue #2441867 by Berdir: Don't require settings.php to be writeable in update.php

parent b79c6508
......@@ -63,34 +63,6 @@ function update_check_incompatibility($name, $type = 'module') {
return FALSE;
}
/**
* Returns whether the settings file requirement has been satisfied.
*
* @return array
* A requirements info array.
*/
function update_settings_file_requirements() {
$requirements = array();
// Check whether settings.php needs to be rewritten.
$settings_file = conf_path() . '/settings.php';
$writable = drupal_verify_install_file($settings_file, FILE_EXIST | FILE_READABLE | FILE_WRITABLE);
$requirements['settings file']['title'] = 'Settings file';
if ($writable) {
$requirements['settings file'] += array(
'value' => 'settings.php is writable.',
);
}
else {
$requirements['settings file'] += array(
'value' => 'settings.php is not writable.',
'severity' => REQUIREMENT_ERROR,
'description' => 'Drupal requires write permissions to <em>' . $settings_file . '</em> during the update process. If you are unsure how to grant file permissions, consult the <a href="http://drupal.org/server-permissions">online handbook</a>.',
);
}
return $requirements;
}
/**
* Returns whether the minimum schema requirement has been satisfied.
*
......@@ -127,7 +99,6 @@ function update_check_requirements() {
// Check requirements of all loaded modules.
$requirements = \Drupal::moduleHandler()->invokeAll('requirements', array('update'));
$requirements += update_system_schema_requirements();
$requirements += update_settings_file_requirements();
return $requirements;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment