summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/watchdog.module3
-rw-r--r--modules/watchdog/watchdog.module3
2 files changed, 4 insertions, 2 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);
}
/**
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index 89f2d4f70..6aebf299c 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/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);
}
/**