/[drupal]/contributions/modules/user_stats/user_stats.admin.inc
ViewVC logotype

Diff of /contributions/modules/user_stats/user_stats.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.2, Sat Feb 14 02:49:50 2009 UTC revision 1.1.2.3, Wed Jul 1 07:08:23 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: user_stats.admin.inc,v 1.1.2.1 2009/02/07 04:10:38 liammcdermott Exp $  // $Id: user_stats.admin.inc,v 1.1.2.2 2009/02/14 02:49:50 liammcdermott Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 113  function user_stats_admin_settings() { Line 113  function user_stats_admin_settings() {
113      '#default_value' => variable_get('user_stats_flush_ips_timer', 31536000),      '#default_value' => variable_get('user_stats_flush_ips_timer', 31536000),
114    );    );
115    
116      $form['online_user_options'] = array(
117        '#type' => 'fieldset',
118        '#title' => t('Online users'),
119        '#collapsible' => TRUE,
120        '#collapsed' => FALSE,
121      );
122    
123      // Following blatantly nicked from /modules/user/user.module and should be updated if that changes.
124      $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval');
125      $form['online_user_options']['user_block_seconds_online'] = array('#type' => 'select', '#title' => t('User activity'), '#default_value' => variable_get('user_block_seconds_online', 900), '#options' => $period, '#description' => t('A user is considered online for this long after they have last viewed a page.'));
126    
127    $form['#submit'][] = 'user_stats_settings_change';    $form['#submit'][] = 'user_stats_settings_change';
128    
129    return system_settings_form($form);    return system_settings_form($form);
# Line 121  function user_stats_admin_settings() { Line 132  function user_stats_admin_settings() {
132  /**  /**
133   * Settings change callback.   * Settings change callback.
134   * TODO: make this check a setting has been changed before resetting counts.   * TODO: make this check a setting has been changed before resetting counts.
  *  
  * Am sure some would say this should be in a hook_validate, but it doesn't  
  * actually validate anything, so it's not.  
135   */   */
136  function user_stats_settings_change($form, &$form_state) {  function user_stats_settings_change($form, &$form_state) {
137    $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';    $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.2