You are here

function httpbl_request_whitelist_submit in http:BL 5

Same name and namespace in other branches
  1. 6.2 httpbl.module \httpbl_request_whitelist_submit()
  2. 6 httpbl.module \httpbl_request_whitelist_submit()
  3. 7 httpbl.module \httpbl_request_whitelist_submit()

File

./httpbl.module, line 550
Implementation of http:BL for Drupal. It provides IP-based blacklisting through http:BL and allows linking to a honeypot.

Code

function httpbl_request_whitelist_submit($form_id, $form_values) {
  $ip = _httpbl_ip_address();
  $iplink = _httpbl_iplink($ip);
  if (variable_get('httpbl_log', 1)) {
    watchdog('httpbl', t('Session from %ip whitelisted. Reason: @reason', array(
      '%ip' => $ip,
      '@reason' => $form_values['reason'],
    )), WATCHDOG_WARNING, $iplink);
  }
  drupal_set_message(t('The current session has been whitelisted.'));
  $_SESSION['httpbl_status'] = 'white';
}