diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-17 04:51:51 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-17 04:51:51 +0000 |
commit | 89ade19964b1b330b4e26046b4fd259272d94abe (patch) | |
tree | 86090772d38a226bf0f81a4c21b731501738d2e8 | |
parent | b89421bae48da681feb3d64cebcddf6e8dedc7ff (diff) | |
download | brdo-89ade19964b1b330b4e26046b4fd259272d94abe.tar.gz brdo-89ade19964b1b330b4e26046b4fd259272d94abe.tar.bz2 |
#698978 by jhodgdon: Make documentation for flood_is_allowed() gender-neutral.
-rw-r--r-- | includes/common.inc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/includes/common.inc b/includes/common.inc index d8c4d1842..f41982da9 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1148,22 +1148,25 @@ function flood_clear_event($name, $identifier = NULL) { } /** - * Check if the current visitor is allowed to proceed with the specified event. + * Checks whether user is allowed to proceed with the specified event. * - * The user is allowed to proceed if he did not trigger the specified event more - * than $threshold times in the specified time window. + * Events can have thresholds saying that each user can only do that event + * a certain number of times in a time window. This function verifies that the + * current user has not exceeded this threshold. * * @param $name - * The name of the event. + * The unique name of the event. * @param $threshold - * The maximum number of the specified event allowed per time window. + * The maximum number of times each user can do this event per time window. * @param $window - * Optional number of seconds over which to look for events. Defaults to - * 3600 (1 hour). + * Number of seconds in the time window for this event (default is 3600 + * seconds, or 1 hour). * @param $identifier - * Optional identifier (defaults to the current user's IP address). + * Unique identifier of the current user. Defaults to their IP address. + * * @return - * True if the user did not exceed the hourly threshold. False otherwise. + * TRUE if the user is allowed to proceed. FALSE if they have exceeded the + * threshold and should not be allowed to proceed. */ function flood_is_allowed($name, $threshold, $window = 3600, $identifier = NULL) { if (!isset($identifier)) { |