? 289726_nothing_to_blocked_users_whitespace.patch ? 290781_comment_notify_cleanup.patch ? comment_notify_cleanup.patch Index: comment_notify.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/comment_notify/comment_notify.module,v retrieving revision 1.8.2.1 diff -u -p -r1.8.2.1 comment_notify.module --- comment_notify.module 4 Aug 2008 19:30:45 -0000 1.8.2.1 +++ comment_notify.module 4 Aug 2008 19:41:14 -0000 @@ -267,8 +267,16 @@ function comment_notify_user($type, &$ed } /** + * Implementation of hook_cron(). + */ +function comment_notify_cron() { + // Remove subscriptions for blocked users. + db_query("UPDATE {comment_notify} cn INNER JOIN {comments} c ON cn.cid = c.cid INNER JOIN {users} u ON c.uid = u.uid SET cn.notify = 0 WHERE u.status = 0"); +} + +/** * Private function to send the notifications. - * + * * @param $comment * The comment array as found in hook_comment $op = publish. */ @@ -298,7 +306,7 @@ function _comment_notify_mailalert($comm $from = variable_get('site_mail', ini_get('sendmail_from')); $result = db_query('SELECT DISTINCT c.cid, u.init, c.uid, c.name, c.nid, c.mail cmail, u.mail umail, u.init uinit, c.uid, c.name, cn.notify_hash mymd5 FROM {comments} c INNER JOIN {comment_notify} cn on c.cid = cn.cid LEFT OUTER JOIN {users} u ON c.uid = u.uid - WHERE nid = %d AND cn.notify = 1 AND c.status = 0', $nid + WHERE nid = %d AND cn.notify = 1 AND c.status = 0 AND u.status = 1', $nid ); // TODO? the original big query had stuff making sure the mail was populated and contained .+@.+ Perhaps check for that here and set notify = 0 if that is the case for this cid