comment_multiple_delete_confirm_submit

Definition

comment_multiple_delete_confirm_submit($form_id, $form_values)
modules/comment/comment.module, line 1300

Description

Perform the actual comment deletion.

Code

<?php
function comment_multiple_delete_confirm_submit($form_id, $form_values) {
  if ($form_values['confirm']) {
    foreach ($form_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.'));
  }
  drupal_goto('admin/content/comment');
}
?>
 
 

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.