You are here

function heartbeat_comments_admin_overview_validate in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 modules/heartbeat_comments/heartbeat_comments.admin.inc \heartbeat_comments_admin_overview_validate()

Validate heartbeat_comments_admin_overview form submissions.

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

File

modules/heartbeat_comments/heartbeat_comments.admin.inc, line 73
Admin page callbacks for the heartbeat comments module.

Code

function heartbeat_comments_admin_overview_validate($form, &$form_state) {
  $form_state['values']['comments'] = array_diff($form_state['values']['comments'], array(
    0,
  ));
  if (count($form_state['values']['comments']) == 0) {
    form_set_error('', t('Please select one or more comments to perform the update on.'));
    drupal_goto('admin/content/heartbeat/comments');
  }
}