Commit 1b8dea09 authored by xjm's avatar xjm
Browse files

Issue #2907863 by tucho, Sutharsan, Gábor Hojtsy: Prefer HTTPS protocol over...

Issue #2907863 by tucho, Sutharsan, Gábor Hojtsy: Prefer HTTPS protocol over HTTP when fetching translations
parent 435bae86
......@@ -5,7 +5,7 @@ javascript:
translation:
use_source: remote_and_local
default_filename: '%project-%version.%language.po'
default_server_pattern: 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po'
default_server_pattern: 'https://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po'
overwrite_customized: false
overwrite_not_customized: true
update_interval_days: 0
......
......@@ -304,3 +304,15 @@ function locale_update_8300() {
// the new key value collection.
\Drupal::state()->delete('locale.translation_status');
}
/**
* Update default server pattern value to use https.
*/
function locale_update_8500() {
$update_url = \Drupal::config('locale.settings')->get('translation.default_server_pattern');
if ($update_url == 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po') {
\Drupal::configFactory()->getEditable('locale.settings')
->set('translation.default_server_pattern', 'https://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po')
->save();
}
}
......@@ -99,7 +99,7 @@
*
* @see locale_translation_default_translation_server().
*/
const LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN = 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po';
const LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN = 'https://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po';
/**
* The number of seconds that the translations status entry should be considered.
......
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