You are here

recaptcha.install in reCAPTCHA 6

Provides install, updated, and uninstall functions for recaptcha.

File

recaptcha.install
View source
<?php

/**
 * @file
 * Provides install, updated, and uninstall functions for recaptcha.
 */

/**
 * Implements hook_uninstall().
 */
function recaptcha_uninstall() {

  // Delete all the recaptcha variables and then clear the variable cache
  db_query("DELETE FROM {variable} WHERE name LIKE '%s'", 'recaptcha_%');
  cache_clear_all('variables', 'cache');
}

/**
 * Issue #2473329: Remove obsolete variables.
 */
function recaptcha_update_6100() {
  $ret = array();
  foreach (array(
    'recaptcha_secure_connection',
    'recaptcha_api_server',
    'recaptcha_api_secure_server',
    'recaptcha_verify_server',
  ) as $variable) {
    variable_del($variable);
  }
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Removed obsolete variables.',
  );
  return $ret;
}

Functions

Namesort descending Description
recaptcha_uninstall Implements hook_uninstall().
recaptcha_update_6100 Issue #2473329: Remove obsolete variables.