/[drupal]/contributions/modules/user_stats/user_stats.module
ViewVC logotype

Diff of /contributions/modules/user_stats/user_stats.module

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

revision 1.2.2.16.2.22, Fri Jun 26 07:22:37 2009 UTC revision 1.2.2.16.2.23, Wed Jul 1 07:08:23 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: user_stats.module,v 1.2.2.16.2.21 2009/03/14 00:26:56 liammcdermott Exp $  // $Id: user_stats.module,v 1.2.2.16.2.22 2009/06/26 07:22:37 liammcdermott Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 161  function user_stats_get_stats($type, $ui Line 161  function user_stats_get_stats($type, $ui
161        $data = floor((time() - $user_access) / 86400);        $data = floor((time() - $user_access) / 86400);
162        break;        break;
163      case 'online':      case 'online':
164        $user_access = db_result(db_query("SELECT access FROM {users} WHERE uid = %d", $uid));        $user_access = db_result(db_query("SELECT timestamp FROM {sessions} WHERE uid = %d", $uid));
165        $data = (round((time() - $user_access) / 60) < 15 ? TRUE : FALSE);        $data = ((time() - $user_access) < variable_get('user_block_seconds_online', 900) ? TRUE : FALSE);
166        break;        break;
167      default:      default:
168        // Raise an error if the statistic doesn't exist.        // Raise an error if the statistic doesn't exist.

Legend:
Removed from v.1.2.2.16.2.22  
changed lines
  Added in v.1.2.2.16.2.23

  ViewVC Help
Powered by ViewVC 1.1.2