You are here

function radioactivity_node_comment in Radioactivity 6

File

plugins/radioactivity_node.module, line 205
Node radioactivity

Code

function radioactivity_node_comment(&$a1, $op) {
  switch ($op) {
    case 'insert':
      $nid = $a1['nid'];
      radioactivity_add_energy($nid, 'node', 'comment_insert');
      if ($a1['status'] == COMMENT_PUBLISHED) {
        radioactivity_add_energy($nid, 'node', 'comment_publish');
      }
      break;
    case 'publish':
      $nid = $a1->nid;
      radioactivity_add_energy($nid, 'node', 'comment_publish');
      break;
  }
}