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

We can't execute any 'Update options' if no comments were selected.

File

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

Code

function comment_admin_overview_validate($form_id, $edit) {
  $edit['comments'] = array_diff($edit['comments'], array(
    0,
  ));
  if (count($edit['comments']) == 0) {
    form_set_error('', t('Please select one or more comments to perform the update on.'));
    drupal_goto('admin/comment');
  }
}