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)

Validate comment_admin_overview form submissions.

File

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

Code

function comment_admin_overview_validate($form, &$form_state) {
  $form_state['values']['comments'] = array_diff($form_state['values']['comments'], array(0));
  // We can't execute any 'Update options' if no comments were selected.
  if (count($form_state['values']['comments']) == 0) {
    form_set_error('', t('Select one or more comments to perform the update on.'));
  }
}
Login or register to post comments