From 1442a798cfddecaa5e845719a49154dc1ccd37a6 Mon Sep 17 00:00:00 2001
From: pwolanin <pwolanin@49851.no-reply.drupal.org>
Date: Mon, 4 Apr 2011 15:39:54 -0400
Subject: [PATCH] Issue #1113832 by pwolanin: prevent comment links from being added to the search index

---
 modules/comment/comment.module |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 9ab70c5..dec9678 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -997,7 +997,7 @@ function comment_build_content($comment, $node, $view_mode = 'full', $langcode =
     '#pre_render' => array('drupal_pre_render_links'),
     '#attributes' => array('class' => array('links', 'inline')),
   );
-  if (empty($comment->in_preview)) {
+  if (empty($comment->in_preview) && $view_mode != 'search_index' && $view_mode != 'search_result') {
     $comment->content['links']['comment'] = array(
       '#theme' => 'links__comment__comment',
       '#links' => comment_links($comment, $node),
@@ -1340,7 +1340,7 @@ function comment_node_update_index($node) {
     if ($node->comment && $cids = comment_get_thread($node, $mode, $comments_per_page)) {
       $comments = comment_load_multiple($cids);
       comment_prepare_thread($comments);
-      $build = comment_view_multiple($comments, $node);
+      $build = comment_view_multiple($comments, $node, 'search_index');
       return drupal_render($build);
     }
   }
-- 
1.7.1.1

