diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-01-11 21:19:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-01-11 21:19:19 +0000 |
commit | bdbd0dffe5960abaae3de9774ad104bd117dc706 (patch) | |
tree | a6654f7beea0d0344a349ada4723408bc54ef83f /modules/statistics | |
parent | f80c6184276793e60cd67ef0bad39c2c1914e10e (diff) | |
download | brdo-bdbd0dffe5960abaae3de9774ad104bd117dc706.tar.gz brdo-bdbd0dffe5960abaae3de9774ad104bd117dc706.tar.bz2 |
- Patch #266246 by David Strauss: added smart defaults for system_settings_form().
Diffstat (limited to 'modules/statistics')
-rw-r--r-- | modules/statistics/statistics.admin.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/statistics/statistics.admin.inc b/modules/statistics/statistics.admin.inc index 7d359d616..db13fbf1b 100644 --- a/modules/statistics/statistics.admin.inc +++ b/modules/statistics/statistics.admin.inc @@ -189,14 +189,14 @@ function statistics_access_logging_settings() { $form['access']['statistics_enable_access_log'] = array( '#type' => 'radios', '#title' => t('Enable access log'), - '#default_value' => variable_get('statistics_enable_access_log', 0), + '#default_value' => 0, '#options' => $options, '#description' => t('Log each page access. Required for referrer statistics.')); $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval'); $form['access']['statistics_flush_accesslog_timer'] = array( '#type' => 'select', '#title' => t('Discard access logs older than'), - '#default_value' => variable_get('statistics_flush_accesslog_timer', 259200), + '#default_value' => 259200, '#options' => $period, '#description' => t('Older access log entries (including referrer statistics) will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status')))); @@ -207,9 +207,9 @@ function statistics_access_logging_settings() { $form['content']['statistics_count_content_views'] = array( '#type' => 'radios', '#title' => t('Count content views'), - '#default_value' => variable_get('statistics_count_content_views', 0), + '#default_value' => 0, '#options' => $options, '#description' => t('Increment a counter each time content is viewed.')); - return system_settings_form($form); + return system_settings_form($form, TRUE); } |