You are here

function bb2_read_settings in Bad Behavior 6.2

Same name and namespace in other branches
  1. 5.2 badbehavior.module \bb2_read_settings()
  2. 6 badbehavior.module \bb2_read_settings()
  3. 7.2 badbehavior.module \bb2_read_settings()

Retrieve settings from database.

Return value

array

1 call to bb2_read_settings()
badbehavior_start_badbehavior in ./badbehavior.module

File

./badbehavior.module, line 202
Integrates Bad Behavior with Drupal

Code

function bb2_read_settings() {
  $logging = variable_get('badbehavior_logging', 1);
  return array(
    'log_table' => '{bad_behavior_log}',
    'display_stats' => FALSE,
    'eu_cookie' => FALSE,
    'reverse_proxy' => variable_get('badbehavior_reverse_proxy', variable_get('reverse_proxy', 0)),
    'reverse_proxy_header' => variable_get('badbehavior_reverse_proxy_header', variable_get('reverse_proxy_header', 'X-Forwarded-For')),
    'reverse_proxy_addresses' => variable_get('reverse_proxy_addresses', array()),
    'strict' => variable_get('badbehavior_strict', 0),
    'verbose' => $logging == 'verbose',
    'logging' => !empty($logging),
    'httpbl_key' => variable_get('badbehavior_httpbl_key', ''),
    'httpbl_threat' => variable_get('badbehavior_httpbl_threat', 25),
    'httpbl_maxage' => variable_get('badbehavior_httpbl_age', 30),
    'offsite_forms' => variable_get('badbehavior_offsite_forms', 'FALSE'),
  );
}