comment_admin_overview_validate

5 comment.module comment_admin_overview_validate($form_id, $form_values)
6 comment.admin.inc comment_admin_overview_validate($form, &$form_state)
7 comment.admin.inc comment_admin_overview_validate($form, &$form_state)
8 comment.admin.inc comment_admin_overview_validate($form, &$form_state)

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');
  }
}
Login or register to post comments