1 contact.install | contact_update_1000() |
Convert contact module settings to use configuration files.
Related topics
File
- core/
modules/ contact/ contact.install, line 39 - Install, update and uninstall functions for the contact module.
Code
function contact_update_1000() {
// Migrate variables to config.
$config = config('contact.settings');
$config->set('contact_default_status', update_variable_get('contact_default_status', 1));
$config->set('contact_threshold_limit', update_variable_get('contact_threshold_limit', 5));
$config->set('contact_threshold_window', update_variable_get('contact_threshold_window', 3600));
$config->save();
// Delete variables.
update_variable_del('contact_default_status');
update_variable_del('contact_threshold_limit');
update_variable_del('contact_threshold_window');
}