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.6 -r1.7 --- openacs-4/packages/attachments/www/go-to-attachment.xql 15 May 2007 20:14:19 -0000 1.6 +++ openacs-4/packages/attachments/www/go-to-attachment.xql 3 Sep 2024 15:37:35 -0000 1.7 @@ -1,23 +1,42 @@ - - - select url - from cr_extlinks - where extlink_id = :attachment_id - - + + + select url + from cr_extlinks + where extlink_id = :attachment_id + + + + + select r.title, + i.name, + o.package_id, + m.file_extension + from cr_revisions r, + cr_items i, + acs_objects o, + cr_mime_types m + where i.item_id = :attachment_id + and r.revision_id = i.live_revision + and i.item_id = o.object_id + and m.mime_type = r.mime_type + + - + - select r.title,i.name, o.package_id, m.file_extension - from cr_revisions r, cr_items i, acs_objects o, cr_mime_types m - where i.item_id = :attachment_id - and r.revision_id = i.live_revision - and i.item_id = o.object_id - and m.mime_type = r.mime_type + select r.title, + o.package_id, + m.file_extension + from cr_revisions r, + acs_objects o, + cr_mime_types m + where revision_id = :attachment_id + and r.revision_id = o.object_id + and m.mime_type= r.mime_type