summaryrefslogtreecommitdiff
path: root/modules/watchdog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-11-15 21:17:25 +0000
committerDries Buytaert <dries@buytaert.net>2004-11-15 21:17:25 +0000
commit9bf33e5ac8afc192b32e5c5132407d2fd394cecd (patch)
tree0c81f199aeaa3180db9799a5905e538b6d55fcf2 /modules/watchdog.module
parentf67c046d402b53b1c63cd680f98c6ded598c0dbc (diff)
downloadbrdo-9bf33e5ac8afc192b32e5c5132407d2fd394cecd.tar.gz
brdo-9bf33e5ac8afc192b32e5c5132407d2fd394cecd.tar.bz2
- Added generic flood control mechanism to throttle certain operations per hostname (eg. posting comments, requesting passwords, sending e-mails). See flood_register_event() and flood_is_allowed() for details.
Diffstat (limited to 'modules/watchdog.module')
-rw-r--r--modules/watchdog.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/watchdog.module b/modules/watchdog.module
index 89f2d4f70..6aebf299c 100644
--- a/modules/watchdog.module
+++ b/modules/watchdog.module
@@ -71,10 +71,11 @@ function watchdog_perm() {
/**
* Implementation of hook_cron().
*
- * Remove expired log messages.
+ * Remove expired log messages and flood control events.
*/
function watchdog_cron() {
db_query('DELETE FROM {watchdog} WHERE timestamp < %d', time() - variable_get('watchdog_clear', 604800));
+ db_query('DELETE FROM {flood} WHERE timestamp < %d', time() - 3600);
}
/**