Issue #2907863 by tucho, Sutharsan, Gábor Hojtsy: Prefer HTTPS protocol over HTTP when fetching translations
parent
435bae86a1
commit
1b8dea09d2
|
|
@ -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 @@ const LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL = 'remote_and_local';
|
|||
*
|
||||
* @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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue