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.

CommentFileSizeAuthor
#1 throtjv2.patch2.37 KBjvandyk
throtjv.patch1.35 KBjvandyk

Comments

jvandyk’s picture

StatusFileSize
new2.37 KB

More documentation for throttle_status().

dries’s picture

Good stuff. Committed to CVS HEAD! Thanks.

dries’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)