function cmf_admin_comments_form_validate in Content Management Filter 7
Same name and namespace in other branches
- 5 comment.inc \cmf_admin_comments_form_validate()
- 6.2 comment.inc \cmf_admin_comments_form_validate()
- 6 comment.inc \cmf_admin_comments_form_validate()
Form validation before submit. \n We can't execute any 'Update options' if no comments were selected.
Parameters
the ID of the passed form:
array with the form properties values:
File
- ./
comment.inc, line 101 - @brief Content management filter comment operations file.
Code
function cmf_admin_comments_form_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('No items selected.'));
drupal_goto('admin/content/filter');
}
}