Issue #3342489 by _shY, smustgrave, longwave, Wim Leers: Add default value for mail_notification in site.system config
parent
fd36154396
commit
4f633dcc98
|
@ -10,3 +10,4 @@ page:
|
|||
admin_compact_mode: false
|
||||
weight_select_max: 100
|
||||
default_langcode: en
|
||||
mail_notification: null
|
||||
|
|
|
@ -201,3 +201,14 @@ function system_post_update_amend_config_sync_readme_url() {
|
|||
file_put_contents($readme_path, $changed_content);
|
||||
return \t('Amended configuration synchronization readme file content.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds default value for the mail_notification config parameter.
|
||||
*/
|
||||
function system_post_update_mail_notification_setting() {
|
||||
$config = \Drupal::configFactory()->getEditable('system.site');
|
||||
// If the value doesn't exist it always returns NULL.
|
||||
if (is_null($config->get('mail_notification'))) {
|
||||
$config->set('mail_notification', NULL)->save();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase {
|
|||
'admin_compact_mode' => FALSE,
|
||||
'weight_select_max' => 100,
|
||||
'default_langcode' => 'en',
|
||||
'mail_notification' => NULL,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase {
|
|||
'admin_compact_mode' => TRUE,
|
||||
'weight_select_max' => 100,
|
||||
'default_langcode' => 'en',
|
||||
'mail_notification' => NULL,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -10,3 +10,4 @@ page:
|
|||
admin_compact_mode: false
|
||||
weight_select_max: 100
|
||||
default_langcode: en
|
||||
mail_notification: null
|
||||
|
|
|
@ -10,3 +10,4 @@ page:
|
|||
admin_compact_mode: false
|
||||
weight_select_max: 100
|
||||
default_langcode: en
|
||||
mail_notification: null
|
||||
|
|
|
@ -10,3 +10,4 @@ page:
|
|||
admin_compact_mode: false
|
||||
weight_select_max: 91
|
||||
default_langcode: en
|
||||
mail_notification: null
|
||||
|
|
Loading…
Reference in New Issue