You are here

function domain_settings_batch_form_submit in Domain Access 7.2

Same name and namespace in other branches
  1. 6.2 domain_settings/domain_settings.module \domain_settings_batch_form_submit()
  2. 7.3 domain_settings/domain_settings.module \domain_settings_batch_form_submit()

Submit handler for batch domain settings.

1 string reference to 'domain_settings_batch_form_submit'
domain_settings_form_domain_batch_form_alter in domain_settings/domain_settings.module
Handle the batch erasure of Domain Conf settings properly.

File

domain_settings/domain_settings.module, line 345
Allows domain-specific use of Drupal system settings forms.

Code

function domain_settings_batch_form_submit($form, &$form_state) {
  if (empty($form_state['values']['domain_settings_erase'])) {
    domain_batch_form_submit($form, $form_state);
    return;
  }
  foreach (array_filter($form_state['values']['domain_batch']) as $domain_id => $value) {
    domain_settings_reset($domain_id);
  }
  drupal_set_message(t('Domain configuration settings have been reset. Custom module settings have been retained.'));

  // Clear the cache.
  cache_clear_all();
}