mirror of
https://github.com/tag1consulting/d7_to_d10_migration.git
synced 2025-09-08 01:31:21 +00:00
Update Drupal 7 dependencies
This commit is contained in:
parent
7d902ba1ef
commit
13df912654
391 changed files with 2900 additions and 1502 deletions
|
@ -1645,6 +1645,12 @@ function system_cron_settings() {
|
|||
'#default_value' => variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD),
|
||||
'#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'),
|
||||
);
|
||||
$form['cron']['cron_detailed_logging'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Detailed cron logging'),
|
||||
'#default_value' => variable_get('cron_detailed_logging', DRUPAL_CRON_DETAILED_LOGGING),
|
||||
'#description' => t('Run times of individual cron jobs will be written to watchdog'),
|
||||
);
|
||||
|
||||
return system_settings_form($form);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ files[] = system.test
|
|||
required = TRUE
|
||||
configure = admin/config/system
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -567,6 +567,27 @@ function system_requirements($phase) {
|
|||
}
|
||||
}
|
||||
|
||||
// See if trusted hostnames have been configured, and warn the user if they
|
||||
// are not set.
|
||||
if ($phase == 'runtime') {
|
||||
$trusted_host_patterns = variable_get('trusted_host_patterns', array());
|
||||
if (empty($trusted_host_patterns)) {
|
||||
$requirements['trusted_host_patterns'] = array(
|
||||
'title' => $t('Trusted Host Settings'),
|
||||
'value' => $t('Not enabled'),
|
||||
'description' => $t('The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is <strong>highly recommended</strong> that you configure this. See <a href="@url">Protecting against HTTP HOST Header attacks</a> for more information.', array('@url' => 'https://www.drupal.org/node/1992030')),
|
||||
'severity' => REQUIREMENT_ERROR,
|
||||
);
|
||||
}
|
||||
else {
|
||||
$requirements['trusted_host_patterns'] = array(
|
||||
'title' => $t('Trusted Host Settings'),
|
||||
'value' => $t('Enabled'),
|
||||
'description' => $t('The trusted_host_patterns setting is set to allow %trusted_host_patterns', array('%trusted_host_patterns' => implode(', ', $trusted_host_patterns))),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $requirements;
|
||||
}
|
||||
|
||||
|
@ -3420,6 +3441,13 @@ function system_update_7087() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear caches as registry has been altered.
|
||||
*/
|
||||
function system_update_7088() {
|
||||
// Empty update to clear caches.
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "defgroup updates-7.x-extra".
|
||||
* The next series of updates should start at 8000.
|
||||
|
|
|
@ -21,10 +21,8 @@ class DefaultMailSystem implements MailSystemInterface {
|
|||
public function format(array $message) {
|
||||
// Join the body array into one string.
|
||||
$message['body'] = implode("\n\n", $message['body']);
|
||||
// Convert any HTML to plain-text.
|
||||
// Convert any HTML to plain-text and wrap the mail body for sending.
|
||||
$message['body'] = drupal_html_to_text($message['body']);
|
||||
// Wrap the mail body for sending.
|
||||
$message['body'] = drupal_wrap_mail($message['body']);
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
@ -64,7 +62,14 @@ class DefaultMailSystem implements MailSystemInterface {
|
|||
$mail_body = preg_replace('@\r?\n@', $line_endings, $message['body']);
|
||||
// For headers, PHP's API suggests that we use CRLF normally,
|
||||
// but some MTAs incorrectly replace LF with CRLF. See #234403.
|
||||
$mail_headers = join("\n", $mimeheaders);
|
||||
$headers_line_endings = variable_get('mail_headers_line_endings', "\n");
|
||||
if (defined('PHP_VERSION_ID') && PHP_VERSION_ID >= 80000 ) {
|
||||
// PHP 8+ requires headers to be separated by CRLF, see:
|
||||
// - https://bugs.php.net/bug.php?id=81158
|
||||
// - https://github.com/php/php-src/commit/6983ae751cd301886c966b84367fc7aaa1273b2d#diff-c6922cd89f6f75912eb377833ca1eddb7dd41de088be821024b8a0e340fed3df
|
||||
$headers_line_endings = variable_get('mail_headers_line_endings', "\r\n");
|
||||
}
|
||||
$mail_headers = join($headers_line_endings, $mimeheaders);
|
||||
|
||||
// We suppress warnings and notices from mail() because of issues on some
|
||||
// hosts. The return value of this method will still indicate whether mail
|
||||
|
|
|
@ -15,6 +15,11 @@ define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 21600);
|
|||
*/
|
||||
define('DRUPAL_CRON_DEFAULT_THRESHOLD', 10800);
|
||||
|
||||
/**
|
||||
* Detailed cron logging disabled by default.
|
||||
*/
|
||||
define('DRUPAL_CRON_DETAILED_LOGGING', 0);
|
||||
|
||||
/**
|
||||
* New users will be set to the default time zone at registration.
|
||||
*/
|
||||
|
@ -4134,3 +4139,11 @@ function system_file_download($uri) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_registry_files_alter
|
||||
*/
|
||||
function system_registry_files_alter(&$files, $modules) {
|
||||
// Database drivers that use DatabaseStatementPrefetch must include this file.
|
||||
unset($files['includes/database/prefetch.inc']);
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ class Archive_Tar
|
|||
* single string with names separated by a single
|
||||
* blank space.
|
||||
*
|
||||
* @return true on success, false on error.
|
||||
* @return bool true on success, false on error.
|
||||
* @see createModify()
|
||||
*/
|
||||
public function create($p_filelist)
|
||||
|
@ -361,7 +361,7 @@ class Archive_Tar
|
|||
* single string with names separated by a single
|
||||
* blank space.
|
||||
*
|
||||
* @return true on success, false on error.
|
||||
* @return bool true on success, false on error.
|
||||
* @see createModify()
|
||||
* @access public
|
||||
*/
|
||||
|
@ -504,7 +504,7 @@ class Archive_Tar
|
|||
* each element in the list, when
|
||||
* relevant.
|
||||
*
|
||||
* @return true on success, false on error.
|
||||
* @return bool true on success, false on error.
|
||||
*/
|
||||
public function addModify($p_filelist, $p_add_dir, $p_remove_dir = '')
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ class Archive_Tar
|
|||
* gid => the group ID of the file
|
||||
* (default = 0 = root)
|
||||
*
|
||||
* @return true on success, false on error.
|
||||
* @return bool true on success, false on error.
|
||||
*/
|
||||
public function addString($p_filename, $p_string, $p_datetime = false, $p_params = array())
|
||||
{
|
||||
|
@ -683,7 +683,7 @@ class Archive_Tar
|
|||
* @param boolean $p_preserve Preserve user/group ownership of files
|
||||
* @param boolean $p_symlinks Allow symlinks.
|
||||
*
|
||||
* @return true on success, false on error.
|
||||
* @return bool true on success, false on error.
|
||||
* @see extractModify()
|
||||
*/
|
||||
public function extractList($p_filelist, $p_path = '', $p_remove_path = '', $p_preserve = false, $p_symlinks = true)
|
||||
|
@ -721,7 +721,7 @@ class Archive_Tar
|
|||
* list of parameters, in the format attribute code + attribute values :
|
||||
* $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ',');
|
||||
*
|
||||
* @return true on success, false on error.
|
||||
* @return bool true on success, false on error.
|
||||
*/
|
||||
public function setAttribute()
|
||||
{
|
||||
|
@ -2178,7 +2178,7 @@ class Archive_Tar
|
|||
if ($v_extract_file) {
|
||||
if ($v_header['typeflag'] == "5") {
|
||||
if (!@file_exists($v_header['filename'])) {
|
||||
if (!@mkdir($v_header['filename'], 0777)) {
|
||||
if (!@mkdir($v_header['filename'], 0775)) {
|
||||
$this->_error(
|
||||
'Unable to create directory {'
|
||||
. $v_header['filename'] . '}'
|
||||
|
@ -2511,7 +2511,7 @@ class Archive_Tar
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!@mkdir($p_dir, 0777)) {
|
||||
if (!@mkdir($p_dir, 0775)) {
|
||||
$this->_error("Unable to create directory '$p_dir'");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2937,6 +2937,21 @@ class SystemAdminTestCase extends DrupalWebTestCase {
|
|||
$this->drupalGet('');
|
||||
$this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'Compact mode persists on new requests.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Trusted Host Settings message on the status report page.
|
||||
*/
|
||||
function testTrustedHostSettingsMessage() {
|
||||
$this->drupalGet('admin/reports/status');
|
||||
$this->assertText('The trusted_host_patterns setting is not configured in settings.php.');
|
||||
$this->assertNoText('The trusted_host_patterns setting is set to allow');
|
||||
|
||||
variable_set('trusted_host_patterns', array('a_trusted_pattern', 'another_trusted_pattern'));
|
||||
$this->drupalGet('admin/reports/status');
|
||||
$this->assertNoText('The trusted_host_patterns setting is not configured in settings.php.');
|
||||
$this->assertText('The trusted_host_patterns setting is set to allow a_trusted_pattern, another_trusted_pattern');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
|
@ -5,7 +5,7 @@ version = VERSION
|
|||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
; Information added by Drupal.org packaging script on 2024-12-04
|
||||
version = "7.103"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
||||
datestamp = "1733324608"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue