You are here

function comment_multiple_delete_confirm_submit in Drupal 6

Same name and namespace in other branches
  1. 4 modules/comment.module \comment_multiple_delete_confirm_submit()
  2. 5 modules/comment/comment.module \comment_multiple_delete_confirm_submit()
  3. 7 modules/comment/comment.admin.inc \comment_multiple_delete_confirm_submit()

Process comment_multiple_delete_confirm form submissions.

Perform the actual comment deletion.

File

modules/comment/comment.admin.inc, line 197
Admin page callbacks for the comment module.

Code

function comment_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    foreach ($form_state['values']['comments'] as $cid => $value) {
      $comment = _comment_load($cid);
      _comment_delete_thread($comment);
      _comment_update_node_statistics($comment->nid);
    }
    cache_clear_all();
    drupal_set_message(t('The comments have been deleted.'));
  }
  $form_state['redirect'] = 'admin/content/comment';
}