function heartbeat_messages_admin_overview_validate in Heartbeat 6.4
Same name and namespace in other branches
- 7 modules/heartbeat_ui/heartbeat_ui.admin.inc \heartbeat_messages_admin_overview_validate()
Validate heartbeat_messages_admin_overview form submissions.
We can't execute any 'Update options' if no messages were selected.
File
- ./
heartbeat.admin.inc, line 79 - Admnistration tasks for heartbeat.
Code
function heartbeat_messages_admin_overview_validate($form, &$form_state) {
$form_state['values']['heartbeat-activity'] = array_diff($form_state['values']['heartbeat-activity'], array(
0,
));
if (count($form_state['values']['heartbeat-activity']) == 0) {
form_set_error('', t('Please select one or more messages to perform the update on.'));
drupal_goto('admin/content/heartbeat');
}
}