Issue #1655422 by sun, chx, alexpott: Fixed Random test failures in SearchCommentTest.
authorwebchick
Sun, 19 Aug 2012 10:21:38 +0000 (12:21 +0200)
committerwebchick
Sun, 19 Aug 2012 10:21:38 +0000 (12:21 +0200)
core/modules/comment/comment.module

index da5e25b..82a34ff 100644 (file)
@@ -1390,7 +1390,7 @@ function comment_node_update_index(Node $node, $langcode) {
     // not view comments.
     $index_comments = TRUE;
     foreach ($perms['search content'] as $rid) {
-      if (!isset($perms['access comments'][$rid]) && ($rid <= DRUPAL_AUTHENTICATED_RID || !isset($perms['access comments'][DRUPAL_AUTHENTICATED_RID]))) {
+      if (!isset($perms['access comments'][$rid]) && (($rid == DRUPAL_AUTHENTICATED_RID || $rid == DRUPAL_ANONYMOUS_RID) || !isset($perms['access comments'][DRUPAL_AUTHENTICATED_RID]))) {
         $index_comments = FALSE;
         break;
       }