You are here

function acquia_agent_has_update_service in Acquia Connector 7.3

Same name and namespace in other branches
  1. 6.2 acquia_agent/acquia_agent.module \acquia_agent_has_update_service()
  2. 6 acquia_agent/acquia_agent.module \acquia_agent_has_update_service()
  3. 7 acquia_agent/acquia_agent.module \acquia_agent_has_update_service()
  4. 7.2 acquia_agent/acquia_agent.module \acquia_agent_has_update_service()

Returns the stored subscription data.

Only if update service is enabled or FALSE otherwise.

2 calls to acquia_agent_has_update_service()
acquia_agent_system_info_alter in acquia_agent/acquia_agent.module
Implements hook_system_info_alter().
acquia_agent_update_status_alter in acquia_agent/acquia_agent.module
Implements hook_update_status_alter().

File

acquia_agent/acquia_agent.module, line 423
Acquia Agent securely sends information to Acquia Insight.

Code

function acquia_agent_has_update_service() {

  // Include version number information.
  acquia_agent_load_versions();
  $subscription = acquia_agent_settings('acquia_subscription_data');
  if (!IS_ACQUIA_DRUPAL || empty($subscription['active']) || isset($subscription['update_service']) && empty($subscription['update_service'])) {

    // We don't have update service if (1) this is not Acquia Drupal, (2) there
    // is no subscription or (3) the update service was disabled on acquia.com.
    // Requiring the update_service key and checking its value separately is
    // important for backwards compatibility. Isset & empty tells us
    // that the web service willingly told us to not do update notifications.
    return FALSE;
  }
  return $subscription;
}