You are here

warden.install in Warden 6

Same filename and directory in other branches
  1. 8.2 warden.install
  2. 8 warden.install
  3. 7 warden.install
  4. 3.x warden.install

Clean up file for warden

File

warden.install
View source
<?php

/**
 * @file
 * Clean up file for warden
 */

/**
 * Implements hook_uninstall().
 *
 * Removes all settings used by the module.
 */
function warden_uninstall() {
  variable_del('warden_allow_requests');
  variable_del('warden_public_allow_ips');
  variable_del('warden_match_core');
  variable_del('warden_match_contrib');
  variable_del('warden_match_contrib_mode');
  variable_del('warden_preg_match_contrib');
  variable_del('warden_match_custom');
  variable_del('warden_preg_match_custom');
  variable_del('warden_token');
}

/**
 * Implements hook_requirements().
 */
function warden_requirements($phase) {
  $t = get_t();
  $ssl_available = function_exists('openssl_seal');
  return array(
    'warden_openssl' => array(
      'title' => $t('Warden'),
      'value' => $ssl_available ? $t('Open SSL is available') : $t('Open SSL is not available'),
      'description' => $t('The PHP OpenSSL extension needs to be installed to communicate with Warden - ') . l(t('PHP Manual'), 'http://php.net/manual/en/openssl.installation.php'),
      'severity' => $ssl_available ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    ),
  );
}

Functions