Antispam wasn't sending any notification emails on one of my sites, and after a looong search I tracked it down to the first query in antispam_notify_moderators not returning any results, due to the placeholders for the permissions incorrectly including the wildcards in the query rather than the value (see http://api.drupal.org/api/drupal/includes!database!database.inc/group/da...).
So, in antispam.module starting at line 1380, I changed
' WHERE p.permission LIKE \'%:perm1%\''.
' OR p.permission LIKE \'%:perm2%\'';
$result = db_query($sql, array(':perm1' => $moderator_permission, ':perm2' => $administer_permission));
to
' WHERE p.permission LIKE :perm1'.
' OR p.permission LIKE :perm2';
$result = db_query($sql, array(':perm1' => '%' . $moderator_permission . '%', ':perm2' => '%' . $administer_permission . '%'));
And everything's working great now. I should note, this was working on another of my sites, so I guess it may depend on server stuff (the problem site is running PHP 5.3.20 and MySQL 5.5.30, for what it's worth). I also realize this module is not currently maintained, and apologize for not creating a proper patch, but thought I'd create an issue just in case this helps anybody else!
Comments
Comment #2
cfinke CreditAttribution: cfinke commentedComment #3
cfinke CreditAttribution: cfinke commentedCommitted, thanks for the fix!