You are here

function domain_edit_form_submit in Domain Access 5

FormsAPI for domain_edit_form()

File

./domain_admin.inc, line 599
Administration functions for the domain module.

Code

function domain_edit_form_submit($form_id, $form_values) {
  db_query("UPDATE {domain} SET subdomain = '%s', sitename = '%s', scheme = '%s', valid = %d WHERE domain_id = %d", $form_values['subdomain'], $form_values['sitename'], $form_values['scheme'], $form_values['valid'], $form_values['domain_id']);

  // Let other modules act.
  $domain = domain_lookup($form_values['domain_id']);
  module_invoke_all('domainupdate', 'update', $domain, $form_values);

  // The user_submitted flag is needed for Domain User.
  if (!$form_values['domain_arguments']['user_submitted']) {
    drupal_set_message(t('Domain record updated.'));
    drupal_goto('admin/build/domain/view');
  }
}