You are here

google_analytics_reports.install in Google Analytics Reports 6

Same filename and directory in other branches
  1. 7 google_analytics_reports/google_analytics_reports.install

Installation file for Google Analytics Reports module.

File

google_analytics_reports/google_analytics_reports.install
View source
<?php

/**
 * @file
 * Installation file for Google Analytics Reports module.
 */

/**
 * 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 http://drupal.org/node/833192
 */
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;
}

Functions