function comment_multiple_delete_confirm_submit

Form submission handler for comment_multiple_delete_confirm().

File

drupal/core/modules/comment/comment.admin.inc, line 252
Admin page callbacks for the Comment module.

Code

function comment_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    comment_delete_multiple(array_keys($form_state['values']['comments']));
    cache_invalidate_tags(array(
      'content' => TRUE,
    ));
    $count = count($form_state['values']['comments']);
    watchdog('content', 'Deleted @count comments.', array(
      '@count' => $count,
    ));
    drupal_set_message(format_plural($count, 'Deleted 1 comment.', 'Deleted @count comments.'));
  }
  $form_state['redirect'] = 'admin/content/comment';
}