Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.884
diff -u -p -r1.884 comment.module
--- modules/comment/comment.module	24 Jul 2010 17:48:16 -0000	1.884
+++ modules/comment/comment.module	28 Jul 2010 15:12:21 -0000
@@ -597,15 +597,13 @@ function theme_comment_block() {
 function comment_node_view($node, $view_mode) {
   $links = array();
 
-  if ($node->comment) {
+  if ($node->comment != COMMENT_NODE_HIDDEN) {
     if ($view_mode == 'rss') {
-      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))
-        );
-      }
+      // 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))
+      );
     }
     elseif ($view_mode == 'teaser') {
       // Teaser view: display the number of comments that have been posted,
@@ -620,9 +618,7 @@ function comment_node_view($node, $view_
             'fragment' => 'comments',
             'html' => TRUE,
           );
-
-          $new = comment_num_new($node->nid);
-          if (!$new) {
+          if ($new = comment_num_new($node->nid)) {
             $links['comment-new-comments'] = array(
               'title' => format_plural($new, '1 new comment', '@count new comments'),
               'href' => "node/$node->nid",
@@ -645,7 +641,10 @@ function comment_node_view($node, $view_
               );
             }
             else {
-              $links['comment_forbidden']['title'] = theme('comment_post_forbidden', array('node' => $node));
+              $links['comment_forbidden'] = array(
+                'title' => theme('comment_post_forbidden', array('node' => $node)),
+                'html' => TRUE,
+              );
             }
           }
         }
@@ -661,26 +660,23 @@ function comment_node_view($node, $view_
           $links['comment-add'] = array(
             'title' => t('Add new comment'),
             'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')),
+            'href' => "node/$node->nid",
             'fragment' => 'comment-form',
             'html' => TRUE,
           );
           if (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_SEPARATE_PAGE) {
             $links['comment-add']['href'] = "comment/reply/$node->nid";
           }
-          else {
-            $links['comment-add']['href'] = "node/$node->nid";
-          }
         }
         else {
-          $links['comment_forbidden']['title'] = theme('comment_post_forbidden', array('node' => $node));
+          $links['comment_forbidden'] = array(
+            'title' => theme('comment_post_forbidden', array('node' => $node)),
+            'html' => TRUE,
+          );
         }
       }
     }
 
-    if (isset($links['comment_forbidden'])) {
-      $links['comment_forbidden']['html'] = TRUE;
-    }
-
     $node->content['links']['comment'] = array(
       '#theme' => 'links__comment_node',
       '#links' => $links,
