Index: comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.465
diff -u -r1.465 comment.module
--- comment.module	13 Jul 2006 12:29:15 -0000	1.465
+++ comment.module	15 Jul 2006 20:03:47 -0000
@@ -752,8 +752,6 @@
     $order = _comment_get_display_setting('sort');
     $comments_per_page = _comment_get_display_setting('comments_per_page');
 
-    $output .= "<a id=\"comment\"></a>\n";
-
     if ($cid) {
       // Single comment view.
       $query = 'SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users, c.status FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d';
@@ -914,11 +912,13 @@
     if (user_access('post comments') && node_comment_mode($nid) == COMMENT_NODE_READ_WRITE && (variable_get('comment_form_location', COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW)) {
       $output .= comment_form(array('nid' => $nid), t('Post new comment'));
     }
+
+    $output = theme('comment_wrapper', $output);
   }
+
   return $output;
 }
 
-
 /**
  * Menu callback; delete a comment.
  */
@@ -1662,6 +1662,13 @@
   }
 }
 
+/**
+ * Allow themable wrapping of all comments.
+ */
+function theme_comment_wrapper($content) {
+  return '<div id="comments">' . $content . '</div>';
+}
+
 function _comment_delete_thread($comment) {
   if (!is_object($comment) || !is_numeric($comment->cid)) {
     watchdog('content', t('Can not delete non-existent comment.'), WATCHDOG_WARNING);
