Index: openacs-4/packages/attachments/www/go-to-attachment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/go-to-attachment.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/attachments/www/go-to-attachment.tcl 28 Aug 2003 09:41:46 -0000 1.6 +++ openacs-4/packages/attachments/www/go-to-attachment.tcl 23 Aug 2006 12:46:57 -0000 1.7 @@ -26,8 +26,13 @@ } file_storage_object { - set title [db_string select_attachment_title {}] - ad_returnredirect "download/[ad_urlencode $title]?object_id=$object_id&attachment_id=$attachment_id" + db_1row select_attachment_info {}] + if {[parameter::get -package_id $package_id -parameter BehaveLikeFilesystemP -default 0]} { + set filename $title + } else { + set filename name + } + ad_returnredirect "download/[ad_urlencode $filename]?object_id=$object_id&attachment_id=$attachment_id" ad_script_abort return } Index: openacs-4/packages/attachments/www/go-to-attachment.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/go-to-attachment.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/attachments/www/go-to-attachment.xql 28 Aug 2003 09:41:46 -0000 1.4 +++ openacs-4/packages/attachments/www/go-to-attachment.xql 23 Aug 2006 12:46:57 -0000 1.5 @@ -10,13 +10,14 @@ - + - select r.title - from cr_revisions r, cr_items i + select r.title,i.name, o.package_id + from cr_revisions r, cr_items i, acs_objects o where i.item_id = :attachment_id and r.revision_id = i.live_revision + and i.item_id = o.object_id - +