You are here

function system_ip_blocking_delete_submit in Drupal 7

Process system_ip_blocking_delete form submissions.

File

modules/system/system.admin.inc, line 1483
Admin page callbacks for the system module.

Code

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