function spam_mark_node_as_not_spam_action in Spam 6
Implementation of a Drupal action. Mark node as not spam.
File
- content/
spam_content_node.inc, line 273 - Include file for integration with the node system.
Code
function spam_mark_node_as_not_spam_action(&$object, $context = array()) {
// get the nid from the object
if (isset($object->nid)) {
$nid = $object->nid;
}
elseif (isset($context['nid'])) {
$nid = $context['nid'];
}
// make sure we have a node record
if ($nid) {
spam_mark_as_not_spam('node', $nid);
// record a message noting the action taken
watchdog('action', 'Marked node %nid as not spam.', array(
'%nid' => $nid,
));
}
}