function commons_radioactivity_comment_unpublish in Drupal Commons 7.3
Implements hook_comment_unpublish().
Decrease a node's radioactivity when a comment is unpublished.
File
- modules/
commons/ commons_radioactivity/ includes/ incidents/ commons_radioactivity.incidents_comment.inc, line 64 - Radioactivity integration for the Comment module.
Code
function commons_radioactivity_comment_unpublish($comment) {
$node = node_load($comment->nid);
// Unpublishing a user's comment on their own node should not decrease
// radioactivity.
if ($node->uid != $comment->uid) {
commons_radioactivity_incident_node($node, -1 * COMMONS_RADIOACTIVITY_COMMENT);
}
}