Index: openacs-4/packages/mail-tracking/lib/messages.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/lib/messages.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/mail-tracking/lib/messages.tcl	30 Sep 2005 14:45:02 -0000	1.8
+++ openacs-4/packages/mail-tracking/lib/messages.tcl	30 Sep 2005 17:34:38 -0000	1.9
@@ -92,7 +92,9 @@
 	}
 	body {
 	    label "[_ mail-tracking.Body]"
-	    display_col body;noquote
+	    display_template {
+		<a href="/tracking/one-message?log_id=@messages.log_id@" title="#mail-tracking.View_full_message#">#mail-tracking.View#</a>
+	    }
 	}
 	sent_date {
 	    label "[_ mail-tracking.Sent_Date]"
@@ -122,22 +124,24 @@
 
 set orderby [template::list::orderby_clause -name "messages" -orderby]
 
-db_multirow -extend { file_ids sender receiver package_name package_url } messages select_messages {} {
+db_multirow -extend { file_ids sender receiver package_name package_url url_message_id } messages select_messages {} {
+    set sender ""
+    set receiver ""
+    catch { set sender [person::name -person_id $sender_id] } errMsg
+    catch { set receiver [person::name -person_id $recipient_id]} errMsg
 
-    set sender [person::name -person_id $sender_id]
-    set receiver [person::name -person_id $recipient_id]
-
     if {[exists_and_not_null $package_id]} {
 	set package_name [apm_instance_name_from_id $package_id]
 	set package_url [apm_package_url_from_id $package_id]
     } else {
 	set package_name ""
 	set package_url ""
     }
-    set file_ids [application_data_link::get_linked -from_object_id $log_id -to_object_type "file_storage_object"]
+    set file_ids [application_data_link::get_linked -from_object_id $log_id -to_object_type "content_revision"]
     foreach file_id [application_data_link::get_linked -from_object_id $log_id -to_object_type "image"] {
 	lappend file_ids $file_id
     }
+
 }
  
 ad_return_template
\ No newline at end of file