Index: contrib/nodeactivity.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/activity/contrib/nodeactivity.module,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 nodeactivity.module
--- contrib/nodeactivity.module	12 Dec 2007 17:33:14 -0000	1.1.2.5
+++ contrib/nodeactivity.module	24 Jan 2008 21:43:38 -0000
@@ -32,27 +32,29 @@ function nodeactivity_activity_info() {
 function nodeactivity_nodeapi($node, $op, $teaser, $page) {
   switch ($op) {
     case 'insert':
-      if (variable_get('activity_nodeapi_'. $node->type, 0) == 1) {
-        $type = $node->type;
-        $action = $op;
-        $tokens = array(
-          'user-id' => $node->uid,
-          'user-name' => $node->name,
-          'node-id' => $node->nid,
-          'node-title' => $node->title,
-          'node-type' => $node->type,
-        );
-        // if comments are implemented as nodes we change the stored token data
-        if (module_exists('nodecomment')) {
-          $comment = node_load($node->comment_target_nid);
-          $tokens['node-id'] = $node->comment_target_nid;
-          $tokens['node-title'] = $comment->title;
+      if ($node->status==1) {
+        if (variable_get('activity_nodeapi_'. $node->type, 0) == 1) {
+          $type = $node->type;
+          $action = $op;
+          $tokens = array(
+            'user-id' => $node->uid,
+            'user-name' => $node->name,
+            'node-id' => $node->nid,
+            'node-title' => $node->title,
+            'node-type' => $node->type,
+          );
+          // if comments are implemented as nodes we change the stored token data
+          if (module_exists('nodecomment')) {
+            $comment = node_load($node->comment_target_nid);
+            $tokens['node-id'] = $node->comment_target_nid;
+            $tokens['node-title'] = $comment->title;
+          }
+          if ($node->type == 'review') {
+            // add rating data to the list of tokens
+            $tokens['rating'] = $node->field_rating[0]['rating'];
+          }
+          activity_insert('nodeapi', $type, $action, $tokens);
         }
-        if ($node->type == 'review') {
-          // add rating data to the list of tokens
-          $tokens['rating'] = $node->field_rating[0]['rating'];
-        }
-        activity_insert('nodeapi', $type, $action, $tokens);
       }
       break;
   }
