You are here

function acquia_agent_set_submit in Acquia Connector 6

Same name and namespace in other branches
  1. 7 acquia_agent/acquia_agent.pages.inc \acquia_agent_set_submit()

Save acquia_agent_settings form submissions.

1 string reference to 'acquia_agent_set_submit'
acquia_agent_settings_form in acquia_agent/acquia_agent.pages.inc
Settings form builder function.

File

acquia_agent/acquia_agent.pages.inc, line 605
Acquia Agent configuration page.

Code

function acquia_agent_set_submit($form, &$form_state) {
  variable_set('acquia_key', $form_state['values']['acquia_key']);
  variable_set('acquia_identifier', $form_state['values']['acquia_identifier']);
  drupal_set_message(t('The Acquia configuration options have been saved.'));

  // Check subscription and send a heartbeat to Acquia Network via XML-RPC.
  // Our status gets updated locally via the return data.
  acquia_agent_check_subscription();

  // Redirect to the path without the suffix.
  $form_state['redirect'] = 'admin/settings/acquia-agent';
  cache_clear_all();
}