function ban_ip_delete_form_submit

Form submission handler for ban_ip_delete_form().

File

drupal/core/modules/ban/ban.admin.inc, line 134
Administrative functionality for the Ban module.

Code

function ban_ip_delete_form_submit($form, &$form_state) {
  $banned_ip = $form_state['values']['ban_ip'];
  db_delete('ban_ip')
    ->condition('iid', $banned_ip['iid'])
    ->execute();
  watchdog('user', 'Deleted %ip', array(
    '%ip' => $banned_ip['ip'],
  ));
  drupal_set_message(t('The IP address %ip was deleted.', array(
    '%ip' => $banned_ip['ip'],
  )));
  $form_state['redirect'] = 'admin/config/people/ban';
}