You are here

function domain_configure_form_submit in Domain Access 7.2

Same name and namespace in other branches
  1. 6.2 domain.admin.inc \domain_configure_form_submit()

Save any changes to the primary domain record.

1 string reference to 'domain_configure_form_submit'
domain_configure_form in ./domain.admin.inc
FormsAPI for configuring the domain module.

File

./domain.admin.inc, line 363
Administration functions for the domain module.

Code

function domain_configure_form_submit($form, &$form_state) {
  if (!isset($form_state['values']['domain_root'])) {
    return;
  }
  $subdomain = $form_state['values']['domain_root'];
  db_update('domain')
    ->condition('domain_id', 0)
    ->fields(array(
    'subdomain' => $subdomain,
    'sitename' => $form_state['values']['domain_sitename'],
    'scheme' => $form_state['values']['domain_scheme'],
    'valid' => 1,
  ))
    ->execute();

  // Allow other modules to respond to changes.
  module_invoke_all('domainupdate', 'update', domain_default(TRUE));
}