From 2dc3c05a2b40653f10bd57e76007de22b6468a8f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 18 Oct 2009 11:34:45 +0000 Subject: - Patch #589126 by mfb: fixed bug with user module using a flood window of 6 hours, but flood events more than 1 hour old being deleted by cron. Improved API documentation, and added tests. --- modules/contact/contact.pages.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/contact') diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc index fa5606448..72603a39d 100644 --- a/modules/contact/contact.pages.inc +++ b/modules/contact/contact.pages.inc @@ -154,7 +154,7 @@ function contact_site_form_submit($form, &$form_state) { drupal_mail('contact', 'page_autoreply', $from, $language, $values, $to); } - flood_register_event('contact'); + flood_register_event('contact', variable_get('contact_threshold_window', 3600)); watchdog('mail', '%sender-name (@sender-from) sent an e-mail regarding %category.', array('%sender-name' => $values['name'], '@sender-from' => $from, '%category' => $values['category']['category'])); // Jump to home page rather than back to contact page to avoid @@ -278,7 +278,7 @@ function contact_personal_form_submit($form, &$form_state) { drupal_mail('contact', 'user_copy', $from, $language, $values, $from); } - flood_register_event('contact'); + flood_register_event('contact', variable_get('contact_threshold_window', 3600)); watchdog('mail', '%sender-name (@sender-from) sent %recipient-name an e-mail.', array('%sender-name' => $values['name'], '@sender-from' => $from, '%recipient-name' => $values['recipient']->name)); // Jump to the contacted user's profile page. -- cgit v1.2.3