You are here

function commons_radioactivity_comment_publish in Drupal Commons 7.3

Implements hook_comment_publish().

Increase a node's radioactivity when a comment is published.

File

modules/commons/commons_radioactivity/includes/incidents/commons_radioactivity.incidents_comment.inc, line 49
Radioactivity integration for the Comment module.

Code

function commons_radioactivity_comment_publish($comment) {
  $node = node_load($comment->nid);

  // Publishing a user's comment on their own node should not increase
  // radioactivity.
  if ($node->uid != $comment->uid) {
    commons_radioactivity_incident_node($node, COMMONS_RADIOACTIVITY_COMMENT);
  }
}