domain_delete_form_submit($form_id, $form_values)
domain_admin.inc, line 635
FormsAPI for domain_delete_form()
function domain_delete_form_submit($form_id, $form_values) {
// Run the lookup before we delete the row!
$domain = domain_lookup($form_values['domain_id']);
db_query("DELETE FROM {domain} WHERE domain_id = %d", $form_values['domain_id']);
// Let other modules act.
module_invoke_all('domainupdate', 'delete', $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 deleted.'));
// Some tortured logic to return to the root domain and the domain list.
$default = domain_default();
$uri = request_uri();
$_path = explode('/', $uri);
$_slice = array_slice($_path, 0, -2);
$path = implode('/', $_slice) .'/view';
$goto = $default['scheme'] .'://'. $default['subdomain'] . $path;
drupal_goto($goto);
}
}