function comment_confirm_delete_submit in Drupal 6
Same name and namespace in other branches
- 4 modules/comment.module \comment_confirm_delete_submit()
- 5 modules/comment/comment.module \comment_confirm_delete_submit()
- 7 modules/comment/comment.admin.inc \comment_confirm_delete_submit()
Process comment_confirm_delete form submissions.
File
- modules/
comment/ comment.admin.inc, line 254 - Admin page callbacks for the comment module.
Code
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}";
}