You are here

function comment_admin_overview_validate in Drupal 4

Same name and namespace in other branches
  1. 5 modules/comment/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.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');
  }
}