--- C:/Documents and Settings/Rob/Desktop/drupal-5.x-dev/modules/comment/comment.module	Thu Jul 26 20:16:45 2007
+++ F:/webs/educationaltools/modules/comment/comment.module	Thu Aug 23 17:20:18 2007
@@ -1029,22 +1029,28 @@
               $output .= '</div>';
               $last_depth--;
             }
           }
         }
+        
+        $links = module_invoke_all('link', 'comment', $comment, 0);
+        foreach (module_implements('link_alter') as $module) {
+          $function = $module .'_link_alter';
+          $function($node, $links);
+        }
 
         if ($mode == COMMENT_MODE_FLAT_COLLAPSED) {
-          $output .= theme('comment_flat_collapsed', $comment);
+          $output .= theme('comment_flat_collapsed', $comment, $links);
         }
         else if ($mode == COMMENT_MODE_FLAT_EXPANDED) {
-          $output .= theme('comment_flat_expanded', $comment);
+          $output .= theme('comment_flat_expanded', $comment, $links);
         }
         else if ($mode == COMMENT_MODE_THREADED_COLLAPSED) {
-          $output .= theme('comment_thread_collapsed', $comment);
+          $output .= theme('comment_thread_collapsed', $comment, $links);
         }
         else if ($mode == COMMENT_MODE_THREADED_EXPANDED) {
-          $output .= theme('comment_thread_expanded', $comment);
+          $output .= theme('comment_thread_expanded', $comment, $links);
         }
       }
       for ($i = 0; $i < $divs; $i++) {
         $output .= '</div>';
       }
@@ -1788,26 +1794,26 @@
   $output .= '<span class="credit">'. t('by') .' '. theme('username', $comment) ."</span>\n";
   $output .= "</div>\n";
   return $output;
 }
 
-function theme_comment_flat_collapsed($comment) {
-  return theme('comment_view', $comment, '', 0);
+function theme_comment_flat_collapsed($comment, $links) {
+  return theme('comment_view', $comment, $links, 0);
 }
 
-function theme_comment_flat_expanded($comment) {
-  return theme('comment_view', $comment, module_invoke_all('link', 'comment', $comment, 0));
+function theme_comment_flat_expanded($comment, $links) {
+  return theme('comment_view', $comment, $links);
 }
 
-function theme_comment_thread_collapsed($comment) {
-  $output .= theme('comment_view', $comment, '', 0);
+function theme_comment_thread_collapsed($comment, $links) {
+  $output .= theme('comment_view', $comment, $links, 0);
   return $output;
 }
 
-function theme_comment_thread_expanded($comment) {
+function theme_comment_thread_expanded($comment, $links) {
   $output = '';
-  $output .= theme('comment_view', $comment, module_invoke_all('link', 'comment', $comment, 0));
+  $output .= theme('comment_view', $comment, $links);
   return $output;
 }
 
 function theme_comment_post_forbidden($nid) {
   global $user;
