Index: openacs-4/contrib/packages/cop-ui/www/clipboards/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/clipboards/view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/cop-ui/www/clipboards/view.tcl 28 Mar 2004 21:17:10 -0000 1.1 +++ openacs-4/contrib/packages/cop-ui/www/clipboards/view.tcl 1 Apr 2004 12:09:46 -0000 1.2 @@ -27,11 +27,13 @@ set context [list [list ./ Clipboards] $title] +# TODO: Yuck! should fix this query. maybe stick it in a cop_object_type view... db_multirow -extend {clipped} items get_items { - SELECT o.object_id, o.object_type, coalesce(o.title,'object '||o.object_id) as item_title, to_char(m.clipped_on,'YYYY-MM-DD HH24:MI:SS') as clipped_ansi - FROM cop_clipboard_object_map m, acs_objects o + SELECT o.object_id, t.pretty_name as object_type, coalesce(o.title,'object '||o.object_id) as item_title, to_char(m.clipped_on,'YYYY-MM-DD HH24:MI:SS') as clipped_ansi + FROM cop_clipboard_object_map m, acs_objects o, acs_object_types t WHERE clipboard_id = :clipboard_id and o.object_id = m.object_id + and t.object_type = (case when o.object_type = 'content_item' then (select case when i.content_type = 'content_extlink' then 'content_extlink' else r.object_type end from acs_objects r, cr_items i where r.object_id = coalesce(i.live_revision, i.latest_revision, i.item_id) and i.item_id = o.object_id) else o.object_type end) } { set clipped [util::age_pretty -timestamp_ansi $clipped_ansi -sysdate_ansi [clock_to_ansi [clock seconds]]] }