You are here

function module_grants_node_delete_confirm_submit in Module Grants 6.3

Same name and namespace in other branches
  1. 6.4 module_grants.pages.inc \module_grants_node_delete_confirm_submit()

Initiate node deletion and set the redirection page.

File

./module_grants.pages.inc, line 33
Rendering of pages used by Module Grants. Node deletion is overridden here, as node_delete calls node_access(), which it shouldn't when module_grants_node_access() is at work.

Code

function module_grants_node_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    _module_grants_node_delete($form_state['values']['nid']);
  }
  if (module_exists('module_grants_monitor') && user_tools_user_any_access(module_grants_monitor_perm())) {
    $form_state['redirect'] = 'accessible-content';
  }
  else {
    $form_state['redirect'] = '<front>';
  }
}