Index: spam.module =================================================================== --- spam.module (revision 8624) +++ spam.module (working copy) @@ -459,6 +459,15 @@ '#default_value' => variable_get('spam_report_feedback', TRUE), '#description' => t('If checked, users that are able to report content as spam will be required to leave feedback when reporting spam. If unchecked, users will not be prompted to leave feedback.'), ); + + $reportinterval = drupal_map_assoc(array(3600, 7200, 14400, 28800, 86400), 'format_interval'); + $form['advanced']['spam_reportinterval_time'] = array( + '#type' => 'select', + '#title' => t('Reported spam report interval'), + '#default_value' => variable_get('spam_reportinterval_time', 86400), + '#options' => $reportinterval, + '#description' => t('Items that have been reported as spam will be relayed to site administrator every time this much time passes. Requires crontab.'), + ); /* If you feel you need to display more than 50 spam comments or spam nodes * at a time, uncomment the following two lines of code. For most people @@ -489,9 +498,9 @@ function spam_cron() { global $base_url; - // send email notifications every 24 hours + // send email notifications every period of time indicated by spam_reportinterval_time $email_timer = variable_get('spam_email_timer', 0); - if ($email_timer < (time() - 86400)) { + if ($email_timer < (time() - variable_get('spam_reportinterval_time', 86400))) { variable_set('spam_email_timer', time()); $result = db_query('SELECT source, COUNT(source) AS count FROM {spam_reported} GROUP BY source'); if (db_num_rows($result)) {