Index: modules/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment.module,v
retrieving revision 1.200
diff -u -r1.200 comment.module
--- modules/comment.module	24 Dec 2003 13:13:07 -0000	1.200
+++ modules/comment.module	26 Dec 2003 13:41:14 -0000
@@ -284,7 +284,8 @@
   ** Preview the comment:
   */
 
-  $output .= theme("comment_view", $comment, comment_links($comment));
+  $links = module_invoke_all('link', 'comment', $comment, 1);
+  $output .= theme("comment_view", $comment, theme('links', $links));
   $output .= theme("box", t("Reply"), comment_form($edit));
 
   if ($edit["pid"]) {
@@ -535,7 +536,7 @@
     $links[] = $moderation;
   }
 
-  return theme("links", $links);
+  return $links;
 }
 
 function comment_render($node, $cid = 0) {
@@ -598,7 +599,8 @@
       $result = db_query("SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users", $cid);
 
       if ($comment = db_fetch_object($result)) {
-        $output .= theme("comment_view",$comment, comment_links($comment));
+        $links = module_invoke_all('link', 'comment', $comment, 1);
+        $output .= theme("comment_view",$comment, theme('links', $links));
       }
 
       if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) {
@@ -824,6 +826,11 @@
     }
   }
 
+  if ($type == "comment") {
+    $links = comment_links($node, $main);
+  }
+  
+  
   if ($type == "system") {
     if (user_access("administer comments")) {
 
@@ -1413,7 +1420,8 @@
 }
 
 function theme_comment_flat_expanded($comment, $threshold) {
-  return theme("comment_view", $comment, comment_links($comment, 0), comment_visible($comment, $threshold));
+  $links = module_invoke_all('link', 'comment', $comment, 0);
+  return theme("comment_view", $comment, theme('links', $links), comment_visible($comment, $threshold));
 }
 
 function theme_comment_thread_min($comment, $threshold, $pid = 0) {
@@ -1431,7 +1439,8 @@
     $output .= "<div style=\"margin-left:". ($comment->depth * 25) ."px;\">\n";
   }
 
-  $output .= theme("comment_view", $comment, comment_links($comment, 0), comment_visible($comment, $threshold));
+  $links = module_invoke_all('link', 'comment', $comment, 0);
+  $output .= theme("comment_view", $comment, theme('links', $links), comment_visible($comment, $threshold));
 
   if ($comment->depth) {
     $output .= "</div>\n";
