Update to Drupal 8.2.2. For more information, see https://www.drupal.org/project/drupal/releases/8.2.2
This commit is contained in:
parent
23ffed3665
commit
507b45a0ed
378 changed files with 11434 additions and 5542 deletions
|
@ -623,7 +623,7 @@ function system_page_attachments(array &$page) {
|
|||
// Handle setting the "active" class on links by:
|
||||
// - loading the active-link library if the current user is authenticated;
|
||||
// - applying a response filter if the current user is anonymous.
|
||||
// @see l()
|
||||
// @see \Drupal\Core\Link
|
||||
// @see \Drupal\Core\Utility\LinkGenerator::generate()
|
||||
// @see template_preprocess_links()
|
||||
// @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter
|
||||
|
@ -655,15 +655,6 @@ function system_js_settings_build(&$settings, AttachedAssetsInterface $assets) {
|
|||
// @see \Drupal\Core\Theme\AjaxBasePageNegotiator
|
||||
$theme_key = \Drupal::theme()->getActiveTheme()->getName();
|
||||
$settings['ajaxPageState']['theme'] = $theme_key;
|
||||
|
||||
// Provide the page with information about the individual asset libraries
|
||||
// used, information not otherwise available when aggregation is enabled.
|
||||
$minimal_libraries = $library_dependency_resolver->getMinimalRepresentativeSubset(array_merge(
|
||||
$assets->getLibraries(),
|
||||
$assets->getAlreadyLoadedLibraries()
|
||||
));
|
||||
sort($minimal_libraries);
|
||||
$settings['ajaxPageState']['libraries'] = implode(',', $minimal_libraries);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -715,7 +706,7 @@ function system_js_settings_alter(&$settings, AttachedAssetsInterface $assets) {
|
|||
$settings['pluralDelimiter'] = LOCALE_PLURAL_DELIMITER;
|
||||
}
|
||||
// Add the theme token to ajaxPageState, ensuring the database is available
|
||||
// before doing so.
|
||||
// before doing so. Also add the loaded libraries to ajaxPageState.
|
||||
/** @var \Drupal\Core\Asset\LibraryDependencyResolver $library_dependency_resolver */
|
||||
$library_dependency_resolver = \Drupal::service('library.dependency_resolver');
|
||||
if (isset($settings['ajaxPageState']) || in_array('core/drupal.ajax', $library_dependency_resolver->getLibrariesWithDependencies($assets->getAlreadyLoadedLibraries()))) {
|
||||
|
@ -729,6 +720,14 @@ function system_js_settings_alter(&$settings, AttachedAssetsInterface $assets) {
|
|||
->get($active_theme_key);
|
||||
}
|
||||
}
|
||||
// Provide the page with information about the individual asset libraries
|
||||
// used, information not otherwise available when aggregation is enabled.
|
||||
$minimal_libraries = $library_dependency_resolver->getMinimalRepresentativeSubset(array_merge(
|
||||
$assets->getLibraries(),
|
||||
$assets->getAlreadyLoadedLibraries()
|
||||
));
|
||||
sort($minimal_libraries);
|
||||
$settings['ajaxPageState']['libraries'] = implode(',', $minimal_libraries);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue