function comment_multiple_delete_confirm_submit

comment_multiple_delete_confirm_submit($form, &$form_state)

Process comment_multiple_delete_confirm form submissions.

File

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

Code

function comment_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    comment_delete_multiple(array_keys($form_state['values']['comments']));
    cache_clear_all();
    $count = count($form_state['values']['comments']);
    watchdog('content', 'Deleted @count comments.', array('@count' => $count));
    drupal_set_message(format_plural($count, 'Deleted 1 comment.', 'Deleted @count comments.'));
  }
  $form_state['redirect'] = 'admin/content/comment';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!comment!comment.admin.inc/function/comment_multiple_delete_confirm_submit/7.x