Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.709 diff -u -p -r1.709 comment.module --- modules/comment/comment.module 12 May 2009 08:37:44 -0000 1.709 +++ modules/comment/comment.module 20 May 2009 21:52:23 -0000 @@ -424,11 +424,13 @@ function comment_node_view($node, $tease if ($node->comment) { if ($node->build_mode == NODE_BUILD_RSS) { - // Add a comments RSS element which is a URL to the comments of this node. - $node->rss_elements[] = array( - 'key' => 'comments', - 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE)) - ); + if ($node->comment != COMMENT_NODE_HIDDEN) { + // Add a comments RSS element which is a URL to the comments of this node. + $node->rss_elements[] = array( + 'key' => 'comments', + 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE)) + ); + } } else if ($teaser) { // Main page: display the number of comments that have been posted. @@ -714,9 +716,11 @@ function comment_node_delete($node) { */ function comment_node_update_index($node) { $text = ''; - $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED)); - foreach ($comments as $comment) { - $text .= '