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.2 -r1.3
--- openacs-4/packages/mail-tracking/lib/messages.tcl	14 Jun 2005 20:40:55 -0000	1.2
+++ openacs-4/packages/mail-tracking/lib/messages.tcl	15 Jun 2005 16:24:22 -0000	1.3
@@ -45,6 +45,12 @@
             subject {
                 label "[_ mail-tracking.Subject]"
             }
+            object_id {
+                label "[_ mail-tracking.Object_id]"
+            }
+            file_ids {
+                label "[_ mail-tracking.Files]"
+            }
             body {
                 label "[_ mail-tracking.Body]"
             }
@@ -75,17 +81,22 @@
 
 set orderby [template::list::orderby_clause -name "messages" -orderby]
 
-db_multirow -extend { sender receiver package_name package_url } messages select_messages {} {
+db_multirow -extend { file_ids sender receiver package_name package_url } messages select_messages {} {
 
     acs_user::get -user_id $sender_id -array sender_info
     acs_user::get -user_id $recipient_id -array receiver_info
 
     set sender "$sender_info(first_names) $sender_info(last_name)"
     set receiver "$receiver_info(first_names) $receiver_info(last_name)"
 
-    set package_name [apm_instance_name_from_id $package_id]
-    set package_url [apm_package_url_from_id $package_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"]
 }
  
 ad_return_template
\ No newline at end of file