throttle.module uses the 'user_block_seconds_online' variable to determine the time period in which to examine for how many users are online. This defaults to 900 seconds (15 minutes) in user.module. This patch changes the current default in throttle.module from 2700 seconds to 900 seconds so that this value has only one default value Drupal-wide.
I've also added a comment explaining where this is set and changed the module_invoke('throttle', 'status') call to a throttle_status() call. The only reason I can see to use module_invoke() would be if you are another module and want the call to fail gracefully. It doesn't make sense to call module_invoke() for a function that exists in the same module you're in -- you already know that the function is defined. This change speeds up throttle status updates ever so slightly.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | throtjv2.patch | 2.37 KB | jvandyk |
| throtjv.patch | 1.35 KB | jvandyk |
Comments
Comment #1
jvandyk commentedMore documentation for throttle_status().
Comment #2
dries commentedGood stuff. Committed to CVS HEAD! Thanks.
Comment #3
dries commentedComment #4
(not verified) commented