You are here

chr.install in cURL HTTP Request 7

Same filename and directory in other branches
  1. 6 chr.install

Install tasks for chr.

File

chr.install
View source
<?php

/**
 * @file
 * Install tasks for chr.
 */

/**
 * Implements hook_enable().
 */
function chr_enable() {

  // Enable the override.
  if (variable_get('chr_override_drupal_http_request', FALSE)) {
    variable_set('chr_original_http_request_function_value', variable_get('drupal_http_request_function', FALSE));
    variable_set('drupal_http_request_function', 'chr_curl_http_request');
  }
}

/**
 * Implements hook_disable().
 */
function chr_disable() {

  // Restore original override function.
  variable_set('drupal_http_request_function', variable_get('chr_original_http_request_function_value', FALSE));
}

/**
 * Implements hook_uninstall().
 */
function chr_uninstall() {
  variable_del('chr_debug');
  variable_del('chr_override_drupal_http_request');
  variable_del('chr_original_http_request_function_value');
}

Functions

Namesort descending Description
chr_disable Implements hook_disable().
chr_enable Implements hook_enable().
chr_uninstall Implements hook_uninstall().