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 -N -r1.28 -r1.29
--- openacs-4/packages/mail-tracking/lib/messages.tcl 14 May 2006 16:11:19 -0000 1.28
+++ openacs-4/packages/mail-tracking/lib/messages.tcl 13 Jun 2006 06:40:49 -0000 1.29
@@ -250,25 +250,16 @@
set files [list]
# We get the related files for all the object_types
set content_types [list content_revision content_item file_storage_object image]
- foreach content_type $content_types {
-
- foreach file [application_data_link::get_linked -from_object_id $log_id -to_object_type "$content_type"] {
- if { [string equal $content_type "content_revision"] } {
- lappend files [item::get_item_from_revision $file]
- } else {
- lappend files $file
- }
+ db_foreach files {} {
+ if { [string equal $content_type "content_revision"] } {
+ set file [item::get_item_from_revision $file_id]
+ } else {
+ set file $file_id
}
- }
-
- set download_files ""
-
- foreach file $files {
set title [content::item::get_title -item_id $file]
if { [empty_string_p $title] } {
set title [acs_object_name $file]
}
- # Creating the link to dowload the files
append download_files "$title
"
}