function domain_delete_form_submit in Domain Access 6.2
Same name and namespace in other branches
- 5 domain_admin.inc \domain_delete_form_submit()
- 7.3 domain.admin.inc \domain_delete_form_submit()
- 7.2 domain.admin.inc \domain_delete_form_submit()
Implement domain_delete_form submit hook.
File
- ./
domain.admin.inc, line 586 - Administration functions for the domain module.
Code
function domain_delete_form_submit($form, &$form_state) {
// Run the lookup before we delete the row!
$domain = domain_lookup($form_state['values']['domain_id']);
db_query("DELETE FROM {domain} WHERE domain_id = %d", $form_state['values']['domain_id']);
// Let other modules act.
module_invoke_all('domainupdate', 'delete', $domain, $form_state);
// Hide the message from the Domain User module.
if (empty($form_state['values']['domain_arguments']['user_submitted'])) {
drupal_set_message(t('Domain record deleted.'));
$form_state['redirect'] = 'admin/build/domain/view';
}
// Notify that node access needs to be rebuilt.
node_access_needs_rebuild(TRUE);
}