function spam_mark_comment_as_spam_action in Spam 6
Implementation of a Drupal action. Mark comment as spam.
File
- content/
spam_content_comment.inc, line 429 - Include file for integration with comments.
Code
function spam_mark_comment_as_spam_action(&$object, $context = array()) {
// get the cid from the object
if (isset($object->cid)) {
$cid = $object->cid;
}
elseif (isset($context['cid'])) {
$cid = $context['cid'];
}
// make sure we have a comment record
if ($cid) {
spam_mark_as_spam('comment', $cid);
// record a message noting the action taken
watchdog('action', 'Marked comment %cid as spam.', array(
'%cid' => $cid,
));
}
}