--- spam.module.og	2007-03-05 22:08:24.000000000 -0800
+++ spam.module.fix	2007-03-05 22:54:27.000000000 -0800
@@ -1303,42 +1303,41 @@
   else if ($type == 'node' && variable_get("spam_filter_$content->type", 0)) {
     $id = $content->nid;
   }
   else {
     return $output;
   }
-
+	
   $p = db_fetch_object(db_query("SELECT probability FROM {spam_tracker} WHERE id = %d AND source = '%s'", $id, $type));
   $spam = array('href' => "spam/$type/$id/spam", 'title' => t('mark as spam'));
   $notspam = array('href' => "spam/$type/$id/notspam", 'title' => t('mark as not spam'));
   $access = user_access('access spam');
   $report = user_access('report spam');
   $admin = user_access('administer spam');
   $display = variable_get('spam_display_probability', 0);
   if (variable_get('spam_log_level', SPAM_LOG)) {
-    $display_text = " (". l($p->probability, "admin/spam/logs/$type/$id") .")";
-  }
-  else {
-    $display_text = " ($p->probability)";
+	$log_id = db_fetch_object(db_query("SELECT sid FROM {spam_log} WHERE id = %d AND source = '%s'", $id, $type));
+	$log_link = "admin/content/spam/logs/entry/$log_id->sid";
+	$display_text = " ($p->probability)";
   }
 
   if (!$p->probability && $admin) {
     $output['spam-spam'] = $spam;
     $output['spam-notspam'] = $notspam;
   }
   else if ($p->probability < variable_get('spam_threshold', 80)) {
     if ($access) {
-      $output['spam-probability'] = array('title' => t('not spam') . ($display ? $display_text : ''));
+      $output['spam-probability'] = array('href' => $log_link, 'title' => t('not spam') . ($display ? $display_text : ''));
     }
     if ($admin) {
       $output['spam-spam'] = $spam;
     }
   }
   else {
     if ($access) {
-      $output['spam-probability'] = array('title' => t('spam') . ($display ? $display_text : ''));
+      $output['spam-probability'] = array('href' => $log_link, 'title' => t('spam') . ($display ? $display_text : ''));
     }
     if ($admin) {
       $output['spam-notspam'] = $notspam;
     }
   }
 
