You are here

function google_analytics_reports_requirements in Google Analytics Reports 6

Same name and namespace in other branches
  1. 7.3 google_analytics_reports.install \google_analytics_reports_requirements()

Implements hook_requirements().

This is duplicated from google_analytics_api_requirements(), because the Drupal 6 installer has a bug that installs the modules in the wrong order.

See also

http://drupal.org/node/833192

File

google_analytics_reports/google_analytics_reports.install, line 14
Installation file for Google Analytics Reports module.

Code

function google_analytics_reports_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'install') {
    include_once drupal_get_path('module', 'autoload') . '/autoload.module';
    if (!function_exists('autoload_registry_rebuild')) {
      $requirements['autoload_version'] = array(
        'title' => $t('Autoload version'),
        'description' => $t('Your version of Autoload appears to be out of date.  Version 2.x is required.'),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}