From 48e293a6b3d647d79b7b3ce58ab467f9c3fd6de7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 7 May 2008 19:17:50 +0000 Subject: - Patch #248436 by catch: fixed some bugs in the statistics module, wrote some tests, and made some minor usability improvments along the way. That is _exactly_ how we like it. --- modules/system/system.admin.inc | 5 +++-- modules/system/system.module | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 43416c9c5..7ebac6c37 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1104,10 +1104,10 @@ function system_ip_blocking() { ); } - $output .= theme('table', $header, $rows); - $output .= drupal_get_form('system_ip_blocking_form'); + $output .= theme('table', $header, $rows); + return $output; } @@ -1124,6 +1124,7 @@ function system_ip_blocking_form($form_state) { '#type' => 'textfield', '#size' => 64, '#maxlength' => 32, + '#default_value' => arg(3), '#description' => t('Enter a valid IP address.'), ); $form['submit'] = array( diff --git a/modules/system/system.module b/modules/system/system.module index 2cc438463..0293f65bd 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -495,6 +495,13 @@ function system_menu() { 'page callback' => 'system_ip_blocking', 'access arguments' => array('block IP addresses'), ); + $items['admin/settings/ip-blocking/%'] = array( + 'title' => 'IP address blocking', + 'description' => 'Manage blocked IP addresses.', + 'page callback' => 'system_ip_blocking', + 'access arguments' => array('block IP addresses'), + 'type' => MENU_CALLBACK, + ); $items['admin/settings/ip-blocking/delete/%blocked_ip'] = array( 'title' => 'Delete IP address', 'page callback' => 'drupal_get_form', -- cgit v1.2.3