updated core to 8.6.1 via composer

This commit is contained in:
2018-09-12 13:58:26 +02:00
parent a9a219f2ed
commit ea56b9fba3
4443 changed files with 112098 additions and 40708 deletions
+39
View File
@@ -156,3 +156,42 @@ function dblog_update_8400() {
}
}
}
/**
* Change 'No logs message available.' area plugin type.
*/
function dblog_update_8600() {
$config_factory = \Drupal::configFactory();
$view = \Drupal::configFactory()->getEditable('views.view.watchdog');
if (empty($view)) {
return;
}
$empty_text = $view->get('display.default.display_options.empty');
if (!isset($empty_text['area']['content']['value'])) {
return;
}
// Only update the empty text if is untouched from the original version.
if ($empty_text['area']['id'] == 'area' &&
$empty_text['area']['plugin_id'] == 'text' &&
$empty_text['area']['field'] == 'area' &&
$empty_text['area']['content']['value'] == 'No log messages available.') {
$new_config = [
'id' => 'area_text_custom',
'table' => 'views',
'field' => 'area_text_custom',
'relationship' => 'none',
'group_type' => 'group',
'admin_label' => 'No log messages available.',
'empty' => TRUE,
'tokenize' => FALSE,
'content' => 'No log messages available.',
'plugin_id' => 'text_custom',
];
$view->set('display.default.display_options.empty.area', $new_config);
$view->save();
}
}