1 system.install system_update_1013()

Moves site system settings from variable to config.

Related topics

File

core/modules/system/system.install, line 1953
Install, update and uninstall functions for the system module.

Code

function system_update_1013() {
  // Set the default variables for the system.site config file.
  $config = config('system.core');
  $config->set('site_name', update_variable_get('site_name', 'Backdrop'));
  $config->set('site_mail', update_variable_get('site_mail', ''));
  $config->set('site_slogan', update_variable_get('site_slogan', ''));
  $config->set('site_frontpage', update_variable_get('site_frontpage', 'node'));
  $config->set('site_403', update_variable_get('site_403', ''));
  $config->set('site_404', update_variable_get('site_404', ''));
  $config->save();
  // Delete variables.
  update_variable_del('site_name');
  update_variable_del('site_mail');
  update_variable_del('site_slogan');
  update_variable_del('site_frontpage');
  update_variable_del('site_403');
  update_variable_del('site_404');
}