You are here

function antispam_node_load in AntiSpam 7

Implements hook_node_load().

File

./antispam.module, line 731
Primary hook implementations for the Antispam module.

Code

function antispam_node_load($nodes, $types) {
  foreach ($nodes as $node) {
    $rec = db_query("SELECT signature, spaminess FROM {antispam_spam_marks} WHERE content_type='node' AND content_id=:content_id", array(
      ':content_id' => $node->nid,
    ))
      ->fetchObject();
    if ($rec) {
      $node->signature = $rec->signature;
      $node->spaminess = $rec->spaminess;
    }
    else {
      $node->signature = '';
      $node->spaminess = 0.0;
    }
  }
}