function antispam_comment_load in AntiSpam 7
Implements hook_comment_load().
Add signature and spaminess to the $comments object.
File
- ./
antispam.module, line 927 - Primary hook implementations for the Antispam module.
Code
function antispam_comment_load($comments) {
foreach ($comments as $comment) {
$rec = db_query("SELECT signature, spaminess FROM {antispam_spam_marks} WHERE content_type='comment' AND content_id=:content_id", array(
':content_id' => $comment->cid,
))
->fetchObject();
if ($rec) {
$comment->signature = $rec->signature;
$comment->spaminess = $rec->spaminess;
}
else {
$comment->spaminess = 0.0;
}
}
}