You are here

contextual_range_filter.install in Views Contextual Range Filter 7

Same filename and directory in other branches
  1. 8 contextual_range_filter.install

Install and uninstall hooks for the Contextual Range Filter module.

File

contextual_range_filter.install
View source
<?php

/**
 * @file
 * Install and uninstall hooks for the Contextual Range Filter module.
 */

/**
 * Implements hook_requirements().
 */
function contextual_range_filter_requirements($phase) {
  $requirements = array();
  $php_version = phpversion();
  if (version_compare($php_version, '5.3.9', '<')) {
    $t = get_t();
    $requirements['contextual_range_filter'] = array(
      'title' => $t('Views Contextual Range Filter'),
      'value' => $t('This version of Views Contextual Range Filter requires PHP 5.3.9 or later. You are on PHP @version so it will not work properly. Try Views Contexutal Range Filter 7.x-1.1 instead.', array(
        '@version' => $php_version,
      )),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function contextual_range_filter_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'contextual_range_filter%%'");
}