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.14 -r1.15
--- openacs-4/packages/mail-tracking/lib/messages.tcl 5 Oct 2005 22:43:32 -0000 1.14
+++ openacs-4/packages/mail-tracking/lib/messages.tcl 17 Oct 2005 12:47:56 -0000 1.15
@@ -33,6 +33,7 @@
set show_filter_p "t"
}
+set tracking_url [apm_package_url_from_key "mail-tracking"]
# Wich elements will be shown on the list template
set rows_list [list]
if {![exists_and_not_null elements] } {
@@ -121,7 +122,7 @@
body {
label "[_ mail-tracking.Body]"
display_template {
- #mail-tracking.View#
+ #mail-tracking.View#
}
}
sent_date {
@@ -172,20 +173,28 @@
set package_name ""
set package_url ""
}
- 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
- }
- set object_url "/o/$object_id"
+ # We get the related files
+ set files [list]
+ set file_revisions [application_data_link::get_linked -from_object_id $log_id -to_object_type "content_revision"]
+
+ foreach file $file_revisions {
+ lappend files [item::get_item_from_revision $file]
+ }
+
+ foreach file_id [application_data_link::get_linked -from_object_id $log_id -to_object_type "content_item"] {
+ lappend files $file_id
+ }
+
set download_files ""
- foreach file $file_ids {
- set file_item_id [item::get_item_from_revision $file]
- set file_title [content::item::get_title -item_id $file_item_id]
+ foreach file $files {
+ set title [content::item::get_title -item_id $file]
# Creating the link to dowload the files
- append download_files "$file_title
"
+ append download_files "$title
"
}
+
+ set object_url "/o/$object_id"
}
ad_return_template
\ No newline at end of file
Index: openacs-4/packages/mail-tracking/www/one-message.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/www/one-message.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/mail-tracking/www/one-message.tcl 3 Oct 2005 18:31:36 -0000 1.2
+++ openacs-4/packages/mail-tracking/www/one-message.tcl 17 Oct 2005 12:47:56 -0000 1.3
@@ -38,16 +38,21 @@
}
# We get the related files
-set files [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"] {
+set files [list]
+set file_revisions [application_data_link::get_linked -from_object_id $log_id -to_object_type "content_revision"]
+
+foreach file $file_revisions {
+ lappend files [item::get_item_from_revision $file]
+}
+
+foreach file_id [application_data_link::get_linked -from_object_id $log_id -to_object_type "content_item"] {
lappend files $file_id
}
set download_files ""
foreach file $files {
- set file_item_id [item::get_item_from_revision $file]
- set file_title [content::item::get_title -item_id $file_item_id]
+ set title [content::item::get_title -item_id $file]
# Creating the link to dowload the files
- append download_files "$file_title
"
+ append download_files "$title
"
}
\ No newline at end of file
Index: openacs-4/packages/mail-tracking/www/download/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/www/download/index.vuh,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/mail-tracking/www/download/index.vuh 11 Oct 2005 15:01:43 -0000 1.2
+++ openacs-4/packages/mail-tracking/www/download/index.vuh 17 Oct 2005 12:47:56 -0000 1.3
@@ -20,5 +20,4 @@
set user_id [ad_conn user_id]
ad_require_permission $version_id "read"
-
cr_write_content -revision_id $version_id