1 update.install update_update_1000()

Moves update settings from variables to config.

Related topics

File

core/modules/update/update.install, line 179
Install, update, and uninstall functions for the Update Manager module.

Code

function update_update_1000() {
  // Migrate variables to config.
  $config = config('update.settings');
  $config->set('update_disabled_extensions', update_variable_get('update_check_disabled', 0));
  $config->set('update_interval_days', update_variable_get('update_check_frequency', 1));
  $config->set('update_url', update_variable_get('update_fetch_url', ''));
  $config->set('update_max_attempts', update_variable_get('update_max_fetch_attempts', 2));
  $config->set('update_timeout', update_variable_get('update_max_fetch_time', 5));
  $config->set('update_emails', update_variable_get('update_notify_emails', array()));
  $config->set('update_threshold', update_variable_get('update_notification_threshold', 'all'));
  $config->set('update_projects', update_variable_get('update_advanced_project_settings', array()));
  $config->save();

  // Delete variables.
  update_variable_del('update_check_disabled');
  update_variable_del('update_check_frequency');
  update_variable_del('update_fetch_url');
  update_variable_del('update_max_fetch_attempts');
  update_variable_del('update_max_fetch_time');
  update_variable_del('update_notify_emails');
  update_variable_del('update_notification_threshold');
  update_variable_del('update_advanced_project_settings');
}