You are here

function acquia_agent_migrate_page in Acquia Connector 7.2

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

Migrate site to Acquia Cloud

1 string reference to 'acquia_agent_migrate_page'
acquia_agent_menu in acquia_agent/acquia_agent.module
Implementation of hook_menu().

File

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

Code

function acquia_agent_migrate_page() {
  $identifier = acquia_agent_settings('acquia_identifier');
  $key = acquia_agent_settings('acquia_key');
  if ($identifier && $key) {
    $acquia_network_address = acquia_agent_settings('acquia_network_address');
    if (acquia_agent_valid_credentials($identifier, $key, $acquia_network_address)) {
      return drupal_get_form('acquia_agent_migrate_form');
    }
    else {
      $error = acquia_agent_connection_error_message();
    }
  }
  else {
    $error = 'Missing Acquia Subscription credentials. Please enter your Acquia Subscription Identifier and Key.';
  }

  // If there was an error.
  if (isset($error)) {
    drupal_set_message(t('There was an error in communicating with Acquia.com. @err', array(
      '@err' => $error,
    )), 'error');
  }
  drupal_goto('admin/config/system/acquia-agent');
}