You are here

function comment_confirm_delete_submit in Drupal 4

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

File

modules/comment.module, line 894
Enables users to comment on published content.

Code

function comment_confirm_delete_submit($form_id, $form_values) {
  $comment = $form_values['comment'];

  // Delete comment and its replies.
  _comment_delete_thread($comment);
  _comment_update_node_statistics($comment->nid);

  // Clear the cache so an anonymous user sees that his comment was deleted.
  cache_clear_all();
  drupal_set_message(t('The comment and all its replies have been deleted.'));
  return "node/{$comment->nid}";
}