You are here

function comment_admin_overview_validate in Drupal 5

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

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

File

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

Code

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