function evercurrent_send_update_submit in Evercurrent 7.2
Same name and namespace in other branches
- 7 evercurrent.admin.inc \evercurrent_send_update_submit()
1 string reference to 'evercurrent_send_update_submit'
- evercurrent_settings_form in ./
evercurrent.admin.inc - Evercurrent settings form.
File
- ./
evercurrent.admin.inc, line 120
Code
function evercurrent_send_update_submit($form, $form_state) {
system_settings_form_submit($form, $form_state);
$values = $form_state['values'];
if ($values['evercurrent_send_now'] == TRUE) {
// Specify the key if override is checked, to use the newly entered key.
$key = NULL;
if (isset($values['evercurrent_override'])) {
$key = $values['evercurrent_override'] ? $values['evercurrent_key'] : NULL;
}
module_load_include('inc', 'evercurrent', 'evercurrent.send');
if (evercurrent_run_update_check($key)) {
drupal_set_message('Triggered an update to the server.');
}
else {
drupal_set_message('An error occurred while trying to send an update.', 'error');
}
}
}