Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.49
diff -u -r1.49 comment.admin.inc
--- modules/comment/comment.admin.inc	11 Sep 2010 01:47:14 -0000	1.49
+++ modules/comment/comment.admin.inc	12 Sep 2010 12:00:46 -0000
@@ -69,33 +69,30 @@
   );
 
   $query = db_select('comment', 'c')->extend('PagerDefault')->extend('TableSort');
-  $query->join('node', 'n', 'n.nid = c.nid');
-  $query->addField('n', 'title', 'node_title');
   $result = $query
-    ->fields('c', array('cid', 'subject', 'name', 'changed'))
+    ->fields('c', array('cid', 'subject', 'name', 'nid', 'changed'))
     ->condition('c.status', $status)
     ->limit(50)
     ->orderByHeader($header)
     ->execute();
 
-  $cids = array();
+  $cids = $nids = array();
 
   // We collect a sorted list of node_titles during the query to attach to the
   // comments later.
   foreach ($result as $row) {
     $cids[] = $row->cid;
-    $node_titles[] = $row->node_title;
+    $nids[] = $row->nid;
   }
   $comments = comment_load_multiple($cids);
+  // Load every node of comments on this page once.
+  $nodes = node_load_multiple(array_unique($nids));
 
   // Build a table listing the appropriate comments.
   $options = array();
   $destination = drupal_get_destination();
 
   foreach ($comments as $comment) {
-    // Remove the first node title from the node_titles array and attach to
-    // the comment.
-    $comment->node_title = array_shift($node_titles);
     $options[$comment->cid] = array(
       'subject' => array(
         'data' => array(
@@ -109,7 +106,8 @@
       'posted_in' => array(
         'data' => array(
           '#type' => 'link',
-          '#title' => $comment->node_title,
+          '#title' => $nodes[$comment->nid]->title,
+          '#access' => node_access('view', $nodes[$comment->nid]),
           '#href' => 'node/' . $comment->nid,
         ),
       ),
