Show
Ignore:
Timestamp:
07/19/07 16:29:48 (5 years ago)
Author:
benoitg
Message:

UIUserList fixes:

  • Node::getRecentUsers(): Get the 5 most recent users, not some random users in the last week. Also, exclude users currently logged-in.
  • Node::getActiveUsers(): Function was unbearably slow, now limit the search space to the last 3 months. Get the 5 user who connected on the most differents days, instead of users with the worst wireless card ;)
  • schema_validate.php: Add index for timestamp_in on connection table.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/include/schema_validate.php

    r1257 r1260  
    4848 * Define current database schema version 
    4949 */ 
    50 define('REQUIRED_SCHEMA_VERSION', 55); 
     50define('REQUIRED_SCHEMA_VERSION', 56); 
    5151/** Used to test a new shecma version before modyfying the database */ 
    5252define('SCHEMA_UPDATE_TEST_MODE', false); 
     
    12831283        $sql .= "ALTER TABLE nodes ALTER COLUMN last_heartbeat_sys_load SET DEFAULT NULL;\n"; 
    12841284     } 
     1285      
     1286     $new_schema_version = 56; 
     1287     if ($schema_version < $new_schema_version && $new_schema_version <= $targetSchema) { 
     1288     printUpdateVersion($new_schema_version); 
     1289     $sql .= "\n\nUPDATE schema_info SET value='$new_schema_version' WHERE tag='schema_version';\n"; 
     1290        $sql .= "CREATE INDEX idx_connections_timestamp_in ON connections (timestamp_in);\n"; 
     1291     } 
     1292      
    12851293    /* 
    12861294     $new_schema_version = ;