comment_confirm_delete_submit

Versions
4.7 – 5
comment_confirm_delete_submit($form_id, $form_values)
6 – 7
comment_confirm_delete_submit($form, &$form_state)

Process comment_confirm_delete form submissions.

Code

modules/comment/comment.admin.inc, line 255

<?php
function comment_confirm_delete_submit($form, &$form_state) {
  drupal_set_message(t('The comment and all its replies have been deleted.'));

  $comment = $form['#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();

  $form_state['redirect'] = "node/$comment->nid";
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.