You are here

function autoban_analyze_form in Automatic IP ban (Autoban) 7

Set threshold for log analize table.

See also

autoban_ban_all_form_submit()

1 string reference to 'autoban_analyze_form'
autoban_analyze in ./autoban.admin.inc
Menu callback. Analize watchdog.

File

./autoban.admin.inc, line 694
Configuration for autoban module.

Code

function autoban_analyze_form($form, &$form_state, $threshold) {
  $form['analyze'] = array(
    '#type' => 'fieldset',
    '#title' => t('Threshold'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['analyze']['threshold'] = array(
    '#title' => t('Threshold'),
    '#type' => 'select',
    '#multiple' => FALSE,
    '#options' => drupal_map_assoc(_autoban_get_thresholds()),
    '#required' => TRUE,
    '#default_value' => $threshold,
    '#description' => t('The threshold number of the equal <a href="/admin/reports/dblog">log entries</a>.'),
  );
  $form['analyze']['actions'] = array(
    '#type' => 'actions',
  );
  $form['analyze']['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Set'),
  );
  return $form;
}