diff core/modules/config/config.module @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/config/config.module	Thu Feb 28 13:21:36 2019 +0000
+++ b/core/modules/config/config.module	Thu May 09 15:33:08 2019 +0100
@@ -5,6 +5,7 @@
  * Allows site administrators to modify configuration.
  */
 
+use Drupal\Core\Url;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
@@ -19,15 +20,15 @@
       $output .= '<h3>' . t('Uses') . '</h3>';
       $output .= '<dl>';
       $output .= '<dt>' . t('Exporting the full configuration') . '</dt>';
-      $output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.', [':url' => \Drupal::url('config.export_full')]) . '</dd>';
+      $output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.', [':url' => Url::fromRoute('config.export_full')->toString()]) . '</dd>';
       $output .= '<dt>' . t('Importing a full configuration') . '</dt>';
-      $output .= '<dd>' . t('You can upload a full site configuration from an archive file on the <a href=":url">Import</a> page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the <em>system.site</em> configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', [':url' => \Drupal::url('config.import_full')]) . '</dd>';
+      $output .= '<dd>' . t('You can upload a full site configuration from an archive file on the <a href=":url">Import</a> page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the <em>system.site</em> configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', [':url' => Url::fromRoute('config.import_full')->toString()]) . '</dd>';
       $output .= '<dt>' . t('Synchronizing configuration') . '</dt>';
-      $output .= '<dd>' . t('You can review differences between the active configuration and an imported configuration archive on the <a href=":synchronize">Synchronize</a> page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', [':synchronize' => \Drupal::url('config.sync')]) . '</dd>';
+      $output .= '<dd>' . t('You can review differences between the active configuration and an imported configuration archive on the <a href=":synchronize">Synchronize</a> page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', [':synchronize' => Url::fromRoute('config.sync')->toString()]) . '</dd>';
       $output .= '<dt>' . t('Exporting a single configuration item') . '</dt>';
-      $output .= '<dd>' . t('You can export a single configuration item by selecting a <em>Configuration type</em> and <em>Configuration name</em> on the <a href=":single-export">Single export</a> page. The configuration and its corresponding <em>*.yml file name</em> are then displayed on the page for you to copy.', [':single-export' => \Drupal::url('config.export_single')]) . '</dd>';
+      $output .= '<dd>' . t('You can export a single configuration item by selecting a <em>Configuration type</em> and <em>Configuration name</em> on the <a href=":single-export">Single export</a> page. The configuration and its corresponding <em>*.yml file name</em> are then displayed on the page for you to copy.', [':single-export' => Url::fromRoute('config.export_single')->toString()]) . '</dd>';
       $output .= '<dt>' . t('Importing a single configuration item') . '</dt>';
-      $output .= '<dd>' . t('You can import a single configuration item by pasting it in YAML format into the form on the <a href=":single-import">Single import</a> page.', [':single-import' => \Drupal::url('config.import_single')]) . '</dd>';
+      $output .= '<dd>' . t('You can import a single configuration item by pasting it in YAML format into the form on the <a href=":single-import">Single import</a> page.', [':single-import' => Url::fromRoute('config.import_single')->toString()]) . '</dd>';
       $output .= '</dl>';
       return $output;
 
@@ -70,7 +71,7 @@
       $date = DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME'));
       $date_string = $date->format('Y-m-d-H-i');
       $hostname = str_replace('.', '-', $request->getHttpHost());
-      $filename = 'config' . '-' . $hostname . '-' . $date_string . '.tar.gz';
+      $filename = 'config-' . $hostname . '-' . $date_string . '.tar.gz';
       $disposition = 'attachment; filename="' . $filename . '"';
       return [
         'Content-disposition' => $disposition,