function comment_admin_overview_validate in Drupal 6
Same name and namespace in other branches
- 4 modules/comment.module \comment_admin_overview_validate()
- 5 modules/comment/comment.module \comment_admin_overview_validate()
- 7 modules/comment/comment.admin.inc \comment_admin_overview_validate()
Validate comment_admin_overview form submissions.
We can't execute any 'Update options' if no comments were selected.
File
- modules/
comment/ comment.admin.inc, line 82 - 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,
));
if (count($form_state['values']['comments']) == 0) {
form_set_error('', t('Please select one or more comments to perform the update on.'));
}
}