You are here

function node_multiple_delete_confirm_submit in Drupal 7

Same name and namespace in other branches
  1. 4 modules/node.module \node_multiple_delete_confirm_submit()
  2. 5 modules/node/node.module \node_multiple_delete_confirm_submit()
  3. 6 modules/node/node.admin.inc \node_multiple_delete_confirm_submit()

Form submission handler for node_multiple_delete_confirm().

See also

node_admin_nodes()

node_admin_nodes_submit()

node_admin_nodes_validate()

node_filter_form()

node_filter_form_submit()

node_multiple_delete_confirm()

1 string reference to 'node_multiple_delete_confirm_submit'
node_multiple_delete_confirm in modules/node/node.admin.inc
Multiple node deletion confirmation form for node_admin_content().

File

modules/node/node.admin.inc, line 703
Content administration and module settings UI.

Code

function node_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    node_delete_multiple(array_keys($form_state['values']['nodes']));
    cache_clear_all();
    $count = count($form_state['values']['nodes']);
    watchdog('content', 'Deleted @count posts.', array(
      '@count' => $count,
    ));
    drupal_set_message(format_plural($count, 'Deleted 1 post.', 'Deleted @count posts.'));
  }
  $form_state['redirect'] = 'admin/content';
}